From 98c043ed84ea6fe877561da25e1bf94f68374a67 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 8 Jun 2016 22:54:54 +0300 Subject: Bug fix in symbol lookup, could break watchpoints. --- symbol.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'symbol.c') 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 */ -- cgit v1.2.3