From f99cb21c5ddb1d2f55b942d1bb11fabfa689fec2 Mon Sep 17 00:00:00 2001 From: zc <2650838+Wack0@users.noreply.github.com> Date: Fri, 9 Dec 2022 15:45:53 +0000 Subject: [PATCH] asm: fix inverted conditional when assembling by-ref arguments --- IFPSAsmLib/Assembler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IFPSAsmLib/Assembler.cs b/IFPSAsmLib/Assembler.cs index e5bb97f..af719a9 100644 --- a/IFPSAsmLib/Assembler.cs +++ b/IFPSAsmLib/Assembler.cs @@ -383,7 +383,7 @@ namespace IFPSAsmLib // __in|__val|__out|__ref type|__unknown name var arg = new FunctionArgument(); bool isInVal = child.Value == Constants.FUNCTION_ARG_IN || child.Value == Constants.FUNCTION_ARG_VAL; - if (!isInVal && child.Value != Constants.FUNCTION_ARG_OUT && child.Value == Constants.FUNCTION_ARG_REF) + if (!isInVal && child.Value != Constants.FUNCTION_ARG_OUT && child.Value != Constants.FUNCTION_ARG_REF) child.ThrowInvalid(string.Format("In function \"{0}\": Unknown argument type", ret.Name)); arg.ArgumentType = isInVal ? FunctionArgumentType.In : FunctionArgumentType.Out; next = child.Next;