mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-10 12:55:24 +00:00
AGS: Fix loading translation files for Maniac Mansion Mania games
This commit is contained in:
parent
30fad183a7
commit
bf18510727
@ -85,8 +85,14 @@ HError ReadExtData(PfnReadExtBlock reader, int flags, Stream *in) {
|
||||
if (!err)
|
||||
return err;
|
||||
|
||||
// Finally test that we did not read too much or too little
|
||||
soff_t cur_pos = in->GetPosition();
|
||||
|
||||
// WORKAROUND: For at least the MMM games, the translation
|
||||
// files' first block length is incorrect by one byte
|
||||
if (cur_pos == (block_end + 1) && cur_pos < 100)
|
||||
cur_pos = block_end;
|
||||
|
||||
// Finally test that we did not read too much or too little
|
||||
if (cur_pos > block_end) {
|
||||
return new DataExtError(kDataExtErr_BlockDataOverlapping,
|
||||
String::FromFormat("Block: '%s', expected to end at offset: %lld, finished reading at %lld.",
|
||||
|
Loading…
x
Reference in New Issue
Block a user