aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/star_control
diff options
context:
space:
mode:
authorColin Snover2017-04-18 11:16:34 -0500
committerColin Snover2017-04-18 11:47:18 -0500
commita620b6c354a7eee9e521d7e94adc133b4d58b0a1 (patch)
tree3d54efdbcd92b54a48915d9670ec3967fc35e097 /engines/titanic/star_control
parent6cda47ca3d87b4f54ce92a16c97387396314e2af (diff)
downloadscummvm-rg350-a620b6c354a7eee9e521d7e94adc133b4d58b0a1.tar.gz
scummvm-rg350-a620b6c354a7eee9e521d7e94adc133b4d58b0a1.tar.bz2
scummvm-rg350-a620b6c354a7eee9e521d7e94adc133b4d58b0a1.zip
SCI: Fix handling of buggy SCI0 export tables
The previous fix for this bug was incorrect; it only happened to work because of another bug: the number of exports was being read incorrectly (reading the byte size of the export block, not the number of exports), so the validation check for the export number always passed. Then, the "small" offsets that were seen were actually either invalid reads into the header of the next block in the script (KQ4), or reads into the bad first export table which contained an unfilled offset (Camelot). Once the incorrect number of exports was fixed, the previous "fix" broke in KQ4 because the export number validation started to work correctly and the first export table does not have enough entries (needs 2, has 1). This patch fixes the bug by using the last export table in SCI0 scripts instead of the first export table. (This does not affect most scripts, since only the buggy scripts have more than one export table.) Fixes Trac#9731.
Diffstat (limited to 'engines/titanic/star_control')
0 files changed, 0 insertions, 0 deletions