diff --git a/src/interpreter.c b/src/interpreter.c index a4562fe..8498e29 100644 --- a/src/interpreter.c +++ b/src/interpreter.c @@ -1900,7 +1900,7 @@ GroundValue interpretGroundInstruction(GroundInstruction inst, GroundScope* scop runtimeError(ARG_TYPE_MISMATCH, "Expecting a Value", in, currentInstruction); } if (function->nativeFn) { - if (function->args[i].type != ANY || in->args.args[i + 1].value.value.type != function->args[i].type) { + if (function->args[i].type != ANY && in->args.args[i + 1].value.value.type != function->args[i].type) { runtimeError(ARG_TYPE_MISMATCH, "Mismatched function argument types", in, currentInstruction); } } else { @@ -2004,7 +2004,7 @@ GroundValue interpretGroundInstruction(GroundInstruction inst, GroundScope* scop runtimeError(ARG_TYPE_MISMATCH, "Expecting a Value", in, currentInstruction); } if (function->nativeFn) { - if (function->args[i].type != ANY || in->args.args[i + 2].value.value.type != function->args[i].type) { + if (function->args[i].type != ANY && in->args.args[i + 2].value.value.type != function->args[i].type) { runtimeError(ARG_TYPE_MISMATCH, "Mismatched function argument types", in, currentInstruction); } } else {