From: simon Date: Sat, 22 Nov 2008 11:45:04 +0000 (+0000) Subject: Yikes! Replace a + with a *. No wonder the file was small enough X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/agedu/commitdiff_plain/acaf12ce5eade22797c4bcf3530e3bb4e929e261 Yikes! Replace a + with a *. No wonder the file was small enough that indexbuild_rebase() was being called with ib->currroot still NULL. git-svn-id: svn://svn.tartarus.org/sgt/agedu@8315 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/index.c b/index.c index c42da39..28119c8 100644 --- a/index.c +++ b/index.c @@ -52,7 +52,7 @@ static int index_maxdepth(int nodecount) off_t index_initial_size(off_t currentsize, int nodecount) { currentsize += PADDING(currentsize, alignof(off_t)); - currentsize += nodecount + sizeof(off_t); + currentsize += nodecount * sizeof(off_t); currentsize += PADDING(currentsize, alignof(struct avlnode)); return currentsize;