diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | debug.c | 6 |
2 files changed, 9 insertions, 0 deletions
@@ -3,6 +3,9 @@ * awkgram.y: Add lint check for assignment in condition to if and for statements. Thanks to Jannick <thirdedition@gmx.net> for the suggestion. + * debug.c (do_eval): Remove @eval from the symbol table if there + was a syntax error in the statement being evaluated. Thanks again + to Jannick, for the report. 2020-02-01 Arnold D. Robbins <arnold@skeeve.com> @@ -5606,6 +5606,12 @@ do_eval(CMDARG *arg, int cmd ATTRIBUTE_UNUSED) if (ret != 0) { pop_context(); /* switch to prev context */ free_context(ctxt, false /* keep_globals */); + + /* Remove @eval from FUNCTAB. */ + NODE *s = make_string("@eval", 5); + (void) assoc_remove(func_table, s); + unref(s); + return false; } |