aboutsummaryrefslogtreecommitdiff
path: root/sys/boot/common/interp_forth.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/boot/common/interp_forth.c')
-rw-r--r--sys/boot/common/interp_forth.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/boot/common/interp_forth.c b/sys/boot/common/interp_forth.c
index aedac6af09a2..bd59e0dda096 100644
--- a/sys/boot/common/interp_forth.c
+++ b/sys/boot/common/interp_forth.c
@@ -325,13 +325,15 @@ bf_run(char *line)
printf("Parse error!\n");
break;
default:
- /* Hopefully, all other codes filled this buffer */
- printf("%s\n", command_errmsg);
+ if (command_errmsg != NULL) {
+ printf("%s\n", command_errmsg);
+ command_errmsg = NULL;
+ }
}
if (result == VM_USEREXIT)
panic("interpreter exit");
setenv("interpret", bf_vm->state ? "" : "OK", 1);
- return result;
+ return (result);
}