From c6ce89b06babe50427997d1457ffa6371f6db510 Mon Sep 17 00:00:00 2001 From: SpookyDervish Date: Mon, 11 May 2026 21:14:28 +1000 Subject: [PATCH] fix bug with varable arg funcs --- src/compiler.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/compiler.c b/src/compiler.c index 4f8acb7..cb17484 100644 --- a/src/compiler.c +++ b/src/compiler.c @@ -1820,8 +1820,7 @@ ResultType(CometValue, charptr) visitFuncCall(CometCompiler* compiler, CometASTN return arg; // wrong type passed to function - printf("%d %d\n", paramCount, i); - if (arg.as.success.type != paramTypes[i]) { + if (i < paramCount && arg.as.success.type != paramTypes[i]) { ResultType(LLVMValueRef, charptr) castedArg = castToType(compiler, arg.as.success.value, paramTypes[i]); if (castedArg.error) {