aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2018-06-08 07:13:16 +1000
committerSteve Bennett <steveb@workware.net.au>2018-06-08 07:13:16 +1000
commitd0c1c9c437d5e8af31e3abaacde64663e8eb68e5 (patch)
tree04641f04cf7c63442e48523dbf47dddbc774a909
parenteaea86f9c7cc0ac02673e5bcf6ebf7d7ba17dcc8 (diff)
downloadjimtcl-d0c1c9c437d5e8af31e3abaacde64663e8eb68e5.zip
jimtcl-d0c1c9c437d5e8af31e3abaacde64663e8eb68e5.tar.gz
jimtcl-d0c1c9c437d5e8af31e3abaacde64663e8eb68e5.tar.bz2
jim.c: Allow Jim_WrongNumArgs() to accept NULL for msg
For consistency with Tcl Reported-by: Stuart Cassoff <stwo@bell.net> Signed-off-by: Steve Bennett <steveb@workware.net.au>
-rw-r--r--jim.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/jim.c b/jim.c
index 752f014..2d16e55 100644
--- a/jim.c
+++ b/jim.c
@@ -11181,7 +11181,7 @@ void Jim_WrongNumArgs(Jim_Interp *interp, int argc, Jim_Obj *const *argv, const
listObjPtr = Jim_NewListObj(interp, argv, argc);
- if (*msg) {
+ if (msg && *msg) {
Jim_ListAppendElement(interp, listObjPtr, Jim_NewStringObj(interp, msg, -1));
}
Jim_IncrRefCount(listObjPtr);