* 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__archive__
parent
6ed75d476e
commit
74d4cf8ee3
|
@ -10033,7 +10033,10 @@ static int Jim_IfCoreCommand(Jim_Interp *interp, int argc,
|
||||||
if (boolean)
|
if (boolean)
|
||||||
return Jim_EvalObj(interp, argv[current]);
|
return Jim_EvalObj(interp, argv[current]);
|
||||||
/* Ok: no else-clause follows */
|
/* 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++;
|
falsebody = current++;
|
||||||
if (Jim_CompareStringImmediate(interp, argv[falsebody],
|
if (Jim_CompareStringImmediate(interp, argv[falsebody],
|
||||||
"else")) {
|
"else")) {
|
||||||
|
|
Loading…
Reference in New Issue