aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/tinsel/heapmem.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/engines/tinsel/heapmem.cpp b/engines/tinsel/heapmem.cpp
index c06313da20..9e19841562 100644
--- a/engines/tinsel/heapmem.cpp
+++ b/engines/tinsel/heapmem.cpp
@@ -284,6 +284,10 @@ MEM_NODE *MemoryAlloc(int flags, long size) {
HeapCompact(MAX_INT, false);
}
+#ifdef SCUMM_NEED_ALIGNMENT
+ size = (size + 3) & ~3;
+#endif
+
while ((flags & DWM_NOALLOC) == 0 && bCompacted) {
// search the heap for a free block