Fix bug in Minefield's realloc() which was throwing away most of any
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sun, 31 Mar 2002 16:23:32 +0000 (16:23 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sun, 31 Mar 2002 16:23:32 +0000 (16:23 +0000)
block > 4096 bytes. Arrgh.

git-svn-id: svn://svn.tartarus.org/sgt/putty@1611 cda61777-01e9-0310-a592-d414129be87e

misc.c

diff --git a/misc.c b/misc.c
index ee1abf7..6f2d544 100644 (file)
--- a/misc.c
+++ b/misc.c
@@ -294,7 +294,7 @@ static void *minefield_alloc(int size)
     /*
      * Update the admin region.
      */
-    for (i = start + 2; i < start + npages - 1; i++)
+    for (i = start + 2; i < start + npages + 1; i++)
        minefield_admin[i] = 0xFFFE;   /* used but no region starts here */
     minefield_admin[start + 1] = region_start % PAGESIZE;