aboutsummaryrefslogtreecommitdiffstats
path: root/symbol.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2016-06-08 22:54:54 +0300
committerArnold D. Robbins <arnold@skeeve.com>2016-06-08 22:54:54 +0300
commit98c043ed84ea6fe877561da25e1bf94f68374a67 (patch)
treed07e306e3dbb831469804191c53d71e3aefb1cc9 /symbol.c
parentaf38e153c3de3710b7e828f52869b446c73c808d (diff)
downloadegawk-98c043ed84ea6fe877561da25e1bf94f68374a67.tar.gz
egawk-98c043ed84ea6fe877561da25e1bf94f68374a67.tar.bz2
egawk-98c043ed84ea6fe877561da25e1bf94f68374a67.zip
Bug fix in symbol lookup, could break watchpoints.
Diffstat (limited to 'symbol.c')
-rw-r--r--symbol.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/symbol.c b/symbol.c
index 84574e7b..8533fad6 100644
--- a/symbol.c
+++ b/symbol.c
@@ -117,7 +117,9 @@ lookup(const char *name)
}
unref(tmp);
- return n; /* NULL or new place */
+ if (n == NULL || n->type == Node_val) /* non-variable in SYMTAB */
+ return NULL;
+ return n; /* new place */
}
/* make_params --- allocate function parameters for the symbol table */