Fix exit logic.

Signed-off-by: Yilin Sun <imi415@imi.moe>
This commit is contained in:
Yilin Sun 2023-03-08 00:27:32 +08:00
parent af888fb6dd
commit 6b98725b34
Signed by: imi415
GPG Key ID: 17F01E106F9F5E0A
2 changed files with 4 additions and 2 deletions

View File

@ -46,7 +46,7 @@ int app_mrb_repl_init(void) {
parser_state = mrb_parse_string(mrb, mrb_code, cxt);
mrb_load_exec(mrb, parser_state, cxt);
return 0;
}

View File

@ -42,9 +42,11 @@ dead_loop:
}
static void app_mrb_runtime_task(void *parameters) {
bool exit_repl = false;
bool exit_repl;
for (;;) {
exit_repl = false;
if(app_mrb_repl_init() != 0){
printf("Failed to initialize mruby REPL engine.\n");
goto task_fail;