]> granicus.if.org Git - re2c/commitdiff
- Patch to fix limit of scanner buffer, by Jan-Henrik Haukeland (hauk a tildeslash...
authorhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Fri, 7 Mar 2008 22:09:20 +0000 (22:09 +0000)
committerhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Fri, 7 Mar 2008 22:09:20 +0000 (22:09 +0000)
re2c/bootstrap/scanner.cc
re2c/scanner.re

index b9a18c55a9fe94fe1e308b1a64f72fc7f3654153..bf7278c54605a7508b1e32a3deff79e4fdb8b65b 100644 (file)
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.3.dev on Fri Mar  7 22:41:37 2008 */
+/* Generated by re2c 0.13.3.dev on Fri Mar  7 23:02:37 2008 */
 /* $Id$ */
 #include <stdlib.h>
 #include <string.h>
@@ -67,7 +67,7 @@ char *Scanner::fill(char *cursor, uint need)
                        cursor = &buf[cursor - bot];
                        pos = &buf[pos - bot];
                        lim = &buf[lim - bot];
-                       top = &lim[BSIZE];
+                       top = &lim[need];
                        delete [] bot;
                        bot = buf;
                }
index 41a0f1e8c1406232dc1378f20e9d24805398b8be..24ae1a7393c0bc5dbb1dc7a417b53f580ba9f4a4 100644 (file)
@@ -66,7 +66,7 @@ char *Scanner::fill(char *cursor, uint need)
                        cursor = &buf[cursor - bot];
                        pos = &buf[pos - bot];
                        lim = &buf[lim - bot];
-                       top = &lim[BSIZE];
+                       top = &lim[need];
                        delete [] bot;
                        bot = buf;
                }