summaryrefslogtreecommitdiffstats
path: root/parser.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-08-20 07:16:10 -0700
committerKaz Kylheku <kaz@kylheku.com>2019-08-20 07:16:10 -0700
commit78b47c100f11eaea568db71b364ff02e752a741e (patch)
tree7e38cbc9003d97010f3f6263d7377051d9df81d0 /parser.c
parentbad86f52499d49888f0d6ffe8e85d6934b7c7d2c (diff)
downloadtxr-78b47c100f11eaea568db71b364ff02e752a741e.tar.gz
txr-78b47c100f11eaea568db71b364ff02e752a741e.tar.bz2
txr-78b47c100f11eaea568db71b364ff02e752a741e.zip
parser: bugfix: uninitialized ignore flag.
* parser.c (parser_common_init): Initialize the ignore flag, which was until recently called circ_suppress. When the parser is invoked via parse_once or parse_once_noerror, rather than parse, the state of the flag is indeterminate. Thus this only affects the TXR Pattern Language, not TXR Lisp. As a result of this bug, which affects releases 157 through 223, if the circle notation like #1=(foo #1#) is used in Pattern Language syntax, it may not be handled properly. I discovered this bug now because there are new behaviors connected to the flag; it doesn't just affect the processing of the circle notation, but is involved in all symbol handling in the parser.
Diffstat (limited to 'parser.c')
-rw-r--r--parser.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/parser.c b/parser.c
index 2510dbfe..584a923a 100644
--- a/parser.c
+++ b/parser.c
@@ -124,6 +124,7 @@ void parser_common_init(parser_t *p)
p->lineno = 1;
p->errors = 0;
p->eof = 0;
+ p->ignore = 0;
p->stream = nil;
p->name = nil;
p->prepared_msg = nil;