diff options
author | Paul Gilbert | 2017-11-09 18:29:07 -0500 |
---|---|---|
committer | GitHub | 2017-11-09 18:29:07 -0500 |
commit | d8aab6362a82ff9e2424cb7063c78f9b10c4d12a (patch) | |
tree | dfd31e0aaa9efecf52564f8a6382816dc7ca257b | |
parent | cb90f861b866497efbe7a7679d6949b05b108f5e (diff) | |
parent | b0eb5caa511d3783a568c0d40e4b35c169c2272e (diff) | |
download | scummvm-rg350-d8aab6362a82ff9e2424cb7063c78f9b10c4d12a.tar.gz scummvm-rg350-d8aab6362a82ff9e2424cb7063c78f9b10c4d12a.tar.bz2 scummvm-rg350-d8aab6362a82ff9e2424cb7063c78f9b10c4d12a.zip |
Merge pull request #1049 from csnover/lure-unaligned
LURE: Stop taking address of unaligned pointer
-rw-r--r-- | engines/lure/res.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/engines/lure/res.cpp b/engines/lure/res.cpp index 7a79f48b87..dc9ce29af8 100644 --- a/engines/lure/res.cpp +++ b/engines/lure/res.cpp @@ -87,7 +87,7 @@ void Resources::freeData() { } struct AnimRecordTemp { - uint16 *offset; + uint16 offset; MovementDataList *list; }; @@ -235,12 +235,12 @@ void Resources::reloadData() { // Handle any direction frames AnimRecordTemp dirEntries[4] = { - {&animRec->leftOffset, &newEntry->leftFrames}, - {&animRec->rightOffset, &newEntry->rightFrames}, - {&animRec->upOffset, &newEntry->upFrames}, - {&animRec->downOffset, &newEntry->downFrames}}; + {FROM_LE_16(animRec->leftOffset), &newEntry->leftFrames}, + {FROM_LE_16(animRec->rightOffset), &newEntry->rightFrames}, + {FROM_LE_16(animRec->upOffset), &newEntry->upFrames}, + {FROM_LE_16(animRec->downOffset), &newEntry->downFrames}}; for (int dirCtr = 0; dirCtr < 4; ++dirCtr) { - offsetVal = READ_LE_UINT16(dirEntries[dirCtr].offset); + offsetVal = dirEntries[dirCtr].offset; if (offsetVal != 0) { MovementResource *moveRec = (MovementResource *) (mb->data() + offsetVal); |