diff options
| author | Travis Howell | 2004-08-24 05:04:14 +0000 |
|---|---|---|
| committer | Travis Howell | 2004-08-24 05:04:14 +0000 |
| commit | 07eb3f50f9038b31cf4bd75c514fa7297fcafb58 (patch) | |
| tree | ba160658e9ea7a33d7df0e207c02abdabd8a0e5e /scumm/script_v6.cpp | |
| parent | deeadc97fa0001a8013c29dae992a6f6323d995d (diff) | |
| download | scummvm-rg350-07eb3f50f9038b31cf4bd75c514fa7297fcafb58.tar.gz scummvm-rg350-07eb3f50f9038b31cf4bd75c514fa7297fcafb58.tar.bz2 scummvm-rg350-07eb3f50f9038b31cf4bd75c514fa7297fcafb58.zip | |
Correct bug in array loading from index.
A few changes/corrections for HE 7.2
svn-id: r14724
Diffstat (limited to 'scumm/script_v6.cpp')
| -rw-r--r-- | scumm/script_v6.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp index d5bf4908a8..f02b7b56b5 100644 --- a/scumm/script_v6.cpp +++ b/scumm/script_v6.cpp @@ -505,9 +505,8 @@ ArrayHeader *ScummEngine_v6::getArray(int array) { int ScummEngine_v6::readArray(int array, int idx, int base) { ArrayHeader *ah = getArray(array); - if (ah == NULL || ah->data == NULL) { + if (ah == NULL || ah->data == NULL) error("readArray: invalid array %d (%d)", array, readVar(array)); - } // WORKAROUND bug #645711. This is clearly a script bug, as this script // excerpt shows nicely: @@ -565,7 +564,10 @@ void ScummEngine_v6::readArrayFromIndexFile() { a = _fileHandle.readUint16LE(); b = _fileHandle.readUint16LE(); c = _fileHandle.readUint16LE(); - defineArray(num, c, a, b); + if (c == 1) + defineArray(num, kBitArray, a, b); + else + defineArray(num, kIntArray, a, b); } } |
