]> mj.ucw.cz Git - eval.git/blobdiff - judge/judge-shuff.c
mop: mo-score has gained a --table option for nice textual tables
[eval.git] / judge / judge-shuff.c
index fe6933ef81683329852c9ee4777402d2c3ba3a0d..99df3d5cb188bdd5a00815e975a574f66f38fdbd 100644 (file)
@@ -34,7 +34,7 @@ struct tokbuf {
   char *read_pos;
 };
 
-#define TOKBUF_PAGE 256
+#define TOKBUF_PAGE 65536
 
 static void init_tokbuf(struct tokbuf *tb)
 {
@@ -47,6 +47,8 @@ static void add_token(struct tokbuf *tb, char *token, int l)
   struct tokpage *pg = tb->last_page;
   if (!pg || pg->end - pg->pos < l)
     {
+      if (pg)
+       pg->end = pg->pos;
       int size = TOKBUF_PAGE - sizeof(struct tokbuf);
       if (l > size/5)
        size = l;