fix bogus resize length in nextc
This commit is contained in:
parent
194e20a9db
commit
3f6bb86593
@ -272,7 +272,7 @@ tok_nextc(tok)
|
|||||||
tok->start - tok->buf;
|
tok->start - tok->buf;
|
||||||
int curvalid = tok->inp - tok->buf;
|
int curvalid = tok->inp - tok->buf;
|
||||||
int cursize = tok->end - tok->buf;
|
int cursize = tok->end - tok->buf;
|
||||||
int newsize = cursize + BUFSIZ;
|
int newsize = curvalid + BUFSIZ;
|
||||||
char *newbuf = tok->buf;
|
char *newbuf = tok->buf;
|
||||||
RESIZE(newbuf, char, newsize);
|
RESIZE(newbuf, char, newsize);
|
||||||
if (newbuf == NULL) {
|
if (newbuf == NULL) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user