]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
fix bogus resize length in nextc
authorGuido van Rossum <guido@python.org>
Thu, 21 Sep 1995 20:36:34 +0000 (20:36 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 21 Sep 1995 20:36:34 +0000 (20:36 +0000)
Parser/tokenizer.c

index 896b0ce5362e65c04d8f8a46adb059db1bf0da2d..645096ac8057ec164902cb9e025bf4a78780d7a8 100644 (file)
@@ -272,7 +272,7 @@ tok_nextc(tok)
                                               tok->start - tok->buf;
                                int curvalid = tok->inp - tok->buf;
                                int cursize = tok->end - tok->buf;
-                               int newsize = cursize + BUFSIZ;
+                               int newsize = curvalid + BUFSIZ;
                                char *newbuf = tok->buf;
                                RESIZE(newbuf, char, newsize);
                                if (newbuf == NULL) {