diff options
author | Paul Gilbert | 2011-10-16 08:29:46 +1100 |
---|---|---|
committer | Paul Gilbert | 2011-10-16 13:54:54 +1100 |
commit | 0af554b891eb35a222688d5e3df3639afaa3f097 (patch) | |
tree | ca37beeb40a4d1ce72735a913d78acef849a15d2 | |
parent | cc5f37823bef3549096e1d6a99e4edea929fca29 (diff) | |
download | scummvm-rg350-0af554b891eb35a222688d5e3df3639afaa3f097.tar.gz scummvm-rg350-0af554b891eb35a222688d5e3df3639afaa3f097.tar.bz2 scummvm-rg350-0af554b891eb35a222688d5e3df3639afaa3f097.zip |
TSAGE: Workaround for script bug in Blue Force using invalid visage rlb indexes.
This affects the inspection cut-scene on Day 2
-rw-r--r-- | engines/tsage/core.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp index f4118cb45e..6029a91daa 100644 --- a/engines/tsage/core.cpp +++ b/engines/tsage/core.cpp @@ -2814,6 +2814,11 @@ void Visage::setVisage(int resNum, int rlbNum) { if (rlbNum == 0) rlbNum = 1; + // Check how many slots there are + uint16 count = READ_LE_UINT16(indexData); + if (rlbNum > count) + rlbNum = count; + // Get the flags/rlbNum to use uint32 v = READ_LE_UINT32(indexData + (rlbNum - 1) * 4 + 2); int flags = v >> 30; |