diff options
author | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-07-08 12:05:58 +0000 |
---|---|---|
committer | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-07-08 12:05:58 +0000 |
commit | 74d4cf8ee3bee47b29d86926201ec30a65795a97 (patch) | |
tree | 9c13e2355c0814237071262355c698400e27e7e9 /src | |
parent | 6ed75d476e2fdab1b3ed42c33ef8f89e858fb03e (diff) | |
download | openocd_libswd-74d4cf8ee3bee47b29d86926201ec30a65795a97.tar.gz openocd_libswd-74d4cf8ee3bee47b29d86926201ec30a65795a97.tar.bz2 openocd_libswd-74d4cf8ee3bee47b29d86926201ec30a65795a97.tar.xz openocd_libswd-74d4cf8ee3bee47b29d86926201ec30a65795a97.zip |
* src/jim.c: remove bogus return value from if {[expr]} {xx} when
{xx} is not run.
git-svn-id: svn://svn.berlios.de/openocd/trunk@773 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src')
-rw-r--r-- | src/jim.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -10033,7 +10033,10 @@ static int Jim_IfCoreCommand(Jim_Interp *interp, int argc, if (boolean) return Jim_EvalObj(interp, argv[current]); /* Ok: no else-clause follows */ - if (++current >= argc) return JIM_OK; + if (++current >= argc) { + Jim_SetResult(interp, Jim_NewEmptyStringObj(interp)); + return JIM_OK; + } falsebody = current++; if (Jim_CompareStringImmediate(interp, argv[falsebody], "else")) { |