diff options
author | Steve Bennett <steveb@workware.net.au> | 2010-01-24 10:40:18 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2010-10-15 11:02:39 +1000 |
commit | 16360e9b8aded842ab0d343969eb13354750b5bb (patch) | |
tree | de8e8c532fa5e28804360919f0a651a2be8650cf /jimsh.c | |
parent | b6cb7fb49a02a24d4c9435d3c010bb1606c3d6fe (diff) | |
download | jimtcl-16360e9b8aded842ab0d343969eb13354750b5bb.zip jimtcl-16360e9b8aded842ab0d343969eb13354750b5bb.tar.gz jimtcl-16360e9b8aded842ab0d343969eb13354750b5bb.tar.bz2 |
Fix a couple of bugs
Fix unset ::var properly this time
Ensure that jimsh exits with the correct exit code
*: Previously a script that did 'exit 0' would exit with 7!
Diffstat (limited to 'jimsh.c')
-rw-r--r-- | jimsh.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -159,7 +159,8 @@ int main(int argc, char *const argv[]) } else { Jim_SetVariableStr(interp, "argv0", Jim_NewStringObj(interp, argv[1], -1)); Jim_SetVariableStrWithStr(interp, JIM_INTERACTIVE, "0"); - if ((retcode = Jim_EvalFile(interp, argv[1])) == JIM_ERR) { + retcode = Jim_EvalFile(interp, argv[1]); + if (retcode == JIM_ERR || retcode == JIM_ERR_ADDSTACK) { Jim_PrintErrorMessage(interp); } } |