summaryrefslogtreecommitdiffstats
path: root/Parser/tokenizer.c
diff options
context:
space:
mode:
Diffstat (limited to 'Parser/tokenizer.c')
-rw-r--r--Parser/tokenizer.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c
index 7c25450..baed65d 100644
--- a/Parser/tokenizer.c
+++ b/Parser/tokenizer.c
@@ -209,6 +209,7 @@ tok_nextc(tok)
tok->lineno++;
if (buf == NULL) {
free(tok->buf);
+ tok->buf = NULL;
free(new);
tok->done = E_NOMEM;
return EOF;
@@ -309,10 +310,8 @@ tok_backup(tok, c)
register int c;
{
if (c != EOF) {
- if (--tok->cur < tok->buf) {
- fprintf(stderr, "tok_backup: begin of buffer\n");
- abort();
- }
+ if (--tok->cur < tok->buf)
+ fatal("tok_backup: begin of buffer");
if (*tok->cur != c)
*tok->cur = c;
}