summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--malloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/malloc.c b/malloc.c
index fd3b05b272..2716045fae 100644
--- a/malloc.c
+++ b/malloc.c
@@ -1793,7 +1793,7 @@ Perl_sbrk(int size)
# endif
got = (IV)SYSTEM_ALLOC(size);
# if NEEDED_ALIGNMENT > SYSTEM_ALLOC_ALIGNMENT
- got = (got + NEEDED_ALIGNMENT - 1) & (NEEDED_ALIGNMENT - 1);
+ got = (got + NEEDED_ALIGNMENT - 1) & ~(NEEDED_ALIGNMENT - 1);
# endif
if (small) {
/* Chunk is small, register the rest for future allocs. */