From ebe1d712c92d466630f85e084fc3b20db55231dc Mon Sep 17 00:00:00 2001 From: Kayne Ruse Date: Mon, 22 Aug 2022 18:26:05 +0100 Subject: [PATCH] Null values are always allowed --- source/scope.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/scope.c b/source/scope.c index e060747..d2f491a 100644 --- a/source/scope.c +++ b/source/scope.c @@ -33,6 +33,11 @@ static bool checkType(Literal typeLiteral, Literal value) { return false; } + //always allow null values + if (IS_NULL(value)) { + return true; + } + //for each type, if a mismatch is found, return false if (AS_TYPE(typeLiteral).typeOf == LITERAL_BOOLEAN && !IS_BOOLEAN(value)) { return false;