summaryrefslogtreecommitdiffstats
path: root/sys/boot/common
diff options
context:
space:
mode:
Diffstat (limited to 'sys/boot/common')
-rw-r--r--sys/boot/common/interp_forth.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/boot/common/interp_forth.c b/sys/boot/common/interp_forth.c
index cc66c4d..b53da43 100644
--- a/sys/boot/common/interp_forth.c
+++ b/sys/boot/common/interp_forth.c
@@ -132,6 +132,12 @@ bf_command(FICL_VM *vm)
result=BF_PARSE;
}
free(line);
+ /*
+ * If there was error during nested ficlExec(), we may no longer have
+ * valid environment to return. Throw all exceptions from here.
+ */
+ if (result != 0)
+ vmThrow(vm, result);
/* This is going to be thrown!!! */
stackPushINT(vm->pStack,result);
}
OpenPOWER on IntegriCloud