diff options
author | Jordan Crouse <jordan@cosmicpenguin.net> | 2008-11-18 15:41:58 -0700 |
---|---|---|
committer | Jordan Crouse <jordan@cosmicpenguin.net> | 2008-11-18 15:43:57 -0700 |
commit | aac2e161818494b88677f11115bca890a552c709 (patch) | |
tree | c9dfbdb6c447425937414c68d2546042efa04aa3 /src/lx_memory.c | |
parent | fc772694ec04f729b5a1cdced7f33dc406c1d67f (diff) |
LX: Fix a bug in the memory allocator
Diffstat (limited to 'src/lx_memory.c')
-rw-r--r-- | src/lx_memory.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lx_memory.c b/src/lx_memory.c index d71a9a4..9ec8c2b 100644 --- a/src/lx_memory.c +++ b/src/lx_memory.c @@ -96,7 +96,9 @@ GeodeAllocRemainder(GeodeRec * pGeode) nptr = xcalloc(1, sizeof(*nptr)); nptr->offset = ptr->offset + ptr->size; - nptr->size = pGeode->offscreenSize - nptr->offset; + nptr->size = pGeode->offscreenSize - + (nptr->offset - pGeode->offscreenStart); + nptr->next = ptr->next; nptr->prev = ptr; ptr->next = nptr; |