aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--debug.c6
2 files changed, 9 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 40c5626e..840fe133 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
diff --git a/debug.c b/debug.c
index 632d025e..44038ff9 100644
--- a/debug.c
+++ b/debug.c
@@ -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;
}