From 9a6efed42618035a8ab28213f3d9a91fbb19494e Mon Sep 17 00:00:00 2001 From: Maxwell Jeffress Date: Mon, 13 Apr 2026 13:37:42 +1000 Subject: [PATCH] Band-aid fix for null type --- src/interpreter.c | 3 +++ src/types.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/interpreter.c b/src/interpreter.c index 2b27c01..9d6a5e2 100644 --- a/src/interpreter.c +++ b/src/interpreter.c @@ -225,6 +225,9 @@ void addArgsToGroundFunction(GroundFunction* function, GroundValueType type, cha }; GroundValueType stringToValueType(char* in) { + if (in == NULL) { + return ANY; + } if (strcmp(in, "int") == 0) { return INT; } diff --git a/src/types.c b/src/types.c index 25a03fc..0113943 100644 --- a/src/types.c +++ b/src/types.c @@ -362,6 +362,9 @@ void printGroundArg(GroundArg* ga) { break; } case TYPEREF: { + if (ga->value.refName != NULL) { + printf("-any "); + } printf("-%s", ga->value.refName); break; }