Alignment fix
svn-id: r6918
This commit is contained in:
parent
5179aef286
commit
9dba239af1
1 changed files with 9 additions and 0 deletions
|
@ -423,9 +423,18 @@ void Scumm::writeArray(int array, int idx, int base, int value) {
|
||||||
if (ah->type == 4) {
|
if (ah->type == 4) {
|
||||||
ah->data[base] = value;
|
ah->data[base] = value;
|
||||||
} else if (_features & GF_AFTER_V8) {
|
} else if (_features & GF_AFTER_V8) {
|
||||||
|
#if defined(SCUMM_NEED_ALIGNMENT)
|
||||||
|
memcpy(&ah->data[base], &TO_LE_32(value), 4);
|
||||||
|
#else
|
||||||
((uint32 *)ah->data)[base] = TO_LE_32(value);
|
((uint32 *)ah->data)[base] = TO_LE_32(value);
|
||||||
|
#endif
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
#if defined(SCUMM_NEED_ALIGNMENT)
|
||||||
|
memcpy(&ah->data[base], &TO_LE_16(value), 2);
|
||||||
|
#else
|
||||||
((uint16 *)ah->data)[base] = TO_LE_16(value);
|
((uint16 *)ah->data)[base] = TO_LE_16(value);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue