commit | d289918d686fcb0b6a43320ad9dd71dbf1be8afb | [log] [tgz] |
---|---|---|
author | swissChili <swisschili@fastmail.com> | Fri Jul 02 13:30:41 2021 -0700 |
committer | swissChili <swisschili@fastmail.com> | Fri Jul 02 13:30:41 2021 -0700 |
tree | 0a5d6c5849876d681e630b1ee52ce303f46a7723 | |
parent | 64965f143cf0a05803962afa03b2ff49596bb5bc [diff] [blame] |
Fix bug in aligned allocator
diff --git a/src/lisp/plat/linux.c b/src/lisp/plat/linux.c index 83cc39b..2777950 100644 --- a/src/lisp/plat/linux.c +++ b/src/lisp/plat/linux.c
@@ -18,7 +18,7 @@ void **aligned_ptr = (void **)((uintptr_t)(mem + 8 + sizeof(void *)) & ~7); aligned_ptr[-1] = mem; - memcpy(aligned_ptr, addr, (uintptr_t)aligned_ptr[-2]); + memcpy(aligned_ptr, addr, ((uintptr_t *)addr)[-2]); return aligned_ptr; }