diff options
author | Travis Howell | 2005-03-02 08:42:42 +0000 |
---|---|---|
committer | Travis Howell | 2005-03-02 08:42:42 +0000 |
commit | e9136021001992fec4aad97975433daaceb4e242 (patch) | |
tree | b88488066517a933169b30b605673c76896174e4 /scumm | |
parent | 27bcd6e47a0978d88b6d680d303fde666c0d96e7 (diff) | |
download | scummvm-rg350-e9136021001992fec4aad97975433daaceb4e242.tar.gz scummvm-rg350-e9136021001992fec4aad97975433daaceb4e242.tar.bz2 scummvm-rg350-e9136021001992fec4aad97975433daaceb4e242.zip |
Fix array read from files in HE72+
svn-id: r16970
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/script_v72he.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp index ab11381e31..8f68dcc986 100644 --- a/scumm/script_v72he.cpp +++ b/scumm/script_v72he.cpp @@ -1618,8 +1618,10 @@ int ScummEngine_v72he::readFileToArray(int slot, int32 size) { size = _hFileTable[slot].size() - _hFileTable[slot].pos(); writeVar(0, 0); - ArrayHeader *ah = defineArray(0, kByteArray, 0, 0, 0, size); + + size = (FROM_LE_32(ah->dim1end) - FROM_LE_32(ah->dim1start) + 1) * + (FROM_LE_32(ah->dim2end) - FROM_LE_32(ah->dim2start) + 1); _hFileTable[slot].read(ah->data, size); return readVar(0); |