summaryrefslogtreecommitdiff
path: root/mallocx.c
diff options
context:
space:
mode:
Diffstat (limited to 'mallocx.c')
-rw-r--r--mallocx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mallocx.c b/mallocx.c
index eb97947b..a5e2856e 100644
--- a/mallocx.c
+++ b/mallocx.c
@@ -106,7 +106,7 @@ GC_API void * GC_CALL GC_realloc(void * p, size_t lb)
/* Round it up to the next whole heap block */
word descr = GC_obj_kinds[obj_kind].ok_descriptor;
- sz = (sz + HBLKSIZE-1) & ~HBLKMASK;
+ sz = (sz + HBLKSIZE-1) & ~(HBLKSIZE-1);
if (GC_obj_kinds[obj_kind].ok_relocate_descr)
descr += sz;
/* GC_realloc might be changing the block size while */