Skip to content

Commit 5575c55

Browse files
committed
jim.c: Only a return code of -1 (JIM_USAGE) produces usage error
Previously any negative value would produce a usage message but this can affect some code that uses negative return codes for its own purpose. Fixes: #356 Signed-off-by: Steve Bennett <steveb@workware.net.au>
1 parent 7cfe506 commit 5575c55

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jim.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11922,7 +11922,7 @@ static int JimCallNative(Jim_Interp *interp, Jim_Cmd *cmd, int argc, Jim_Obj *co
1192211922
if (argsok) {
1192311923
interp->cmdPrivData = cmd->u.native.privData;
1192411924
ret = cmd->u.native.cmdProc(interp, argc, argv);
11925-
if (ret >= 0) {
11925+
if (ret != JIM_USAGE) {
1192611926
return ret;
1192711927
}
1192811928
/* This means an argument error */

0 commit comments

Comments
 (0)