asm: fix inverted conditional when assembling by-ref arguments

This commit is contained in:
zc 2022-12-09 15:45:53 +00:00
parent a9e627314a
commit f99cb21c5d

View File

@ -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;