]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Fix tree corruption in the "really easy" case on deletion
authorSimon Tatham <anakin@pobox.com>
Tue, 26 Sep 2000 11:16:33 +0000 (11:16 +0000)
committerSimon Tatham <anakin@pobox.com>
Tue, 26 Sep 2000 11:16:33 +0000 (11:16 +0000)
[originally from svn r632]

tree234.c

index 955b6ef1100c57da981e7f637ec7a233f0121828..6dbc2377da15bc077cf3c8caf9c336c06ac42edd 100644 (file)
--- a/tree234.c
+++ b/tree234.c
@@ -494,7 +494,7 @@ void del234(tree234 *t, void *e) {
             */
            int i;
            LOG(("  case 1\n"));
-           for (i = ei; i < 3 && n->elems[i+1]; i++)
+           for (i = ei; i < 2 && n->elems[i+1]; i++)
                n->elems[i] = n->elems[i+1];
            n->elems[i] = NULL;
            return;                    /* finished! */