aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scumm/script_v6.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp
index 307043b469..b0a98e3c0e 100644
--- a/scumm/script_v6.cpp
+++ b/scumm/script_v6.cpp
@@ -425,14 +425,14 @@ void Scumm::writeArray(int array, int idx, int base, int value) {
} else if (_features & GF_AFTER_V8) {
#if defined(SCUMM_NEED_ALIGNMENT)
uint32 tmp = TO_LE_32(value);
- memcpy(&((uint32 *)ah->data)[base], &tmp, 4);
+ memcpy(&((char *)ah->data)[base*sizeof(uint32)], &tmp, 4);
#else
((uint32 *)ah->data)[base] = TO_LE_32(value);
#endif
} else {
#if defined(SCUMM_NEED_ALIGNMENT)
uint16 tmp = TO_LE_16(value);
- memcpy(&((uint16 *)ah->data)[base], &tmp, 2);
+ memcpy(&((char *)ah->data)[base*sizeof(uint16)], &tmp, 2);
#else
((uint16 *)ah->data)[base] = TO_LE_16(value);
#endif