From b30616bb3c30032794a9a6d6a18c42ef37f2d259 Mon Sep 17 00:00:00 2001 From: Inversion Date: Tue, 16 Feb 2021 16:07:10 -0800 Subject: [PATCH] Temporary fix for possible bug --- src/cbaselib.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/cbaselib.c b/src/cbaselib.c index 2441d10..6d7e52d 100644 --- a/src/cbaselib.c +++ b/src/cbaselib.c @@ -30,7 +30,12 @@ int cosmoB_assert(CState *state, int nargs, CValue *args) { } if (!IS_BOOLEAN(args[0]) || (nargs == 2 && !IS_STRING(args[1]))) { - cosmoV_typeError(state, "assert()", ", ", "%s, %s", cosmoV_typeStr(args[0]), cosmoV_typeStr(args[1])); + if (nargs == 2) { + cosmoV_typeError(state, "assert()", ", ", "%s, %s", cosmoV_typeStr(args[0]), cosmoV_typeStr(args[1])); + } + else { + cosmoV_typeError(state, "assert()", "", "%s", cosmoV_typeStr(args[0])); + } return 0; }