From: Kevin Day Date: Sun, 23 Jun 2024 01:58:35 +0000 (-0500) Subject: Update: Reset Controller cache in some cases and do so after error messages. X-Git-Tag: 0.6.11~38 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=a9d501a4006e6ff434be15f0e23e6a6c3f6fcd61;p=fll Update: Reset Controller cache in some cases and do so after error messages. Use the action name item rather than a hard coded string. Make sure the action name item cache is reset after this rather than before. Add additional safety reset before appending to action name item cache. --- diff --git a/level_3/controller/c/entry/private-entry.c b/level_3/controller/c/entry/private-entry.c index 452cb27..29a8bf9 100644 --- a/level_3/controller/c/entry/private-entry.c +++ b/level_3/controller/c/entry/private-entry.c @@ -1739,6 +1739,7 @@ extern "C" { } entry->items.array[at].line = cache->action.line_item; + entry->items.array[at].name.used = 0; status = f_string_dynamic_append_nulless(cache->action.name_item, &entry->items.array[at].name); @@ -1770,15 +1771,12 @@ extern "C" { } if (F_status_is_error_not(status)) { - cache->action.name_action.used = 0; - cache->action.name_item.used = 0; - if (!(code & 0x1)) { if (global.main->error.verbosity != f_console_verbosity_quiet_e) { controller_lock_print(global.main->error.to, global.thread); fl_print_format("%r%[%QThe required %r item '%]", global.main->error.to.stream, f_string_eol_s, global.main->error.context, global.main->error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->error.context); - fl_print_format("%[%r%]", global.main->error.to.stream, global.main->error.notable, controller_main_s, global.main->error.notable); + fl_print_format("%[%r%]", global.main->error.to.stream, global.main->error.notable, cache->action.name_item, global.main->error.notable); fl_print_format("%[' is not found.%]%r", global.main->error.to.stream, global.main->error.context, global.main->error.context, f_string_eol_s); controller_unlock_print_flush(global.main->error.to, global.thread); @@ -1787,6 +1785,9 @@ extern "C" { status = F_status_set_error(F_found_not); } + cache->action.name_action.used = 0; + cache->action.name_item.used = 0; + if (F_status_is_error_not(status)) { controller_entry_action_t *action = 0;