From 156ab3425a5a3b7fddac20c49c8218ad4b8faf5a Mon Sep 17 00:00:00 2001 From: TGE Date: Wed, 27 Nov 2024 12:17:13 +0100 Subject: [PATCH] Fix build --- .../FlowScriptLanguage/Compiler/FlowScriptCompiler.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/AtlusScriptLibrary/FlowScriptLanguage/Compiler/FlowScriptCompiler.cs b/Source/AtlusScriptLibrary/FlowScriptLanguage/Compiler/FlowScriptCompiler.cs index 5d4616b..1a0713b 100644 --- a/Source/AtlusScriptLibrary/FlowScriptLanguage/Compiler/FlowScriptCompiler.cs +++ b/Source/AtlusScriptLibrary/FlowScriptLanguage/Compiler/FlowScriptCompiler.cs @@ -2235,14 +2235,14 @@ bool TryGetVariableIndexArgument(CallOperator callExpression, out short index) } return false; } - bool TryGetCommIndexArgument(CallOperator callExpression, out short index) + bool TryGetCommIndexArgument(CallOperator callExpression, out ushort index) { - index = short.MinValue; + index = ushort.MaxValue; if (callExpression.Arguments.Count == 1) { if (callExpression.Arguments[0].Expression is IntLiteral intArg) { - index = (short)intArg.Value; + index = (ushort)intArg.Value; return true; } else if (callExpression.Arguments[0].Expression is Identifier identifierArg) @@ -2342,7 +2342,7 @@ bool TryGetCommIndexArgument(CallOperator callExpression, out short index) case "__COMM": if (callExpression.Arguments.Count == 1 && TryGetCommIndexArgument(callExpression, out var commIndex)) { - Emit(Instruction.COMM((short)commIndex)); + Emit(Instruction.COMM(commIndex)); } else {