fix part of #53, assertion failure on invalid dotted list

This commit is contained in:
Jeff Bezanson 2019-06-06 19:48:54 -04:00
parent dc62177323
commit d3d3c35ffa
1 changed files with 3 additions and 1 deletions

4
read.c
View File

@ -539,8 +539,10 @@ static void read_list(value_t *pval, value_t label)
t = peek(); t = peek();
if (ios_eof(F)) if (ios_eof(F))
lerror(ParseError, "read: unexpected end of input"); lerror(ParseError, "read: unexpected end of input");
if (t != TOK_CLOSE) if (t != TOK_CLOSE) {
take();
lerror(ParseError, "read: expected ')'"); lerror(ParseError, "read: expected ')'");
}
} }
} }
take(); take();