[Scummvm-git-logs] scummvm master -> bf185107272d7c07da36988dd56d8a6112a52edf

dreammaster dreammaster at scummvm.org
Sun Jun 27 19:10:49 UTC 2021


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
bf18510727 AGS: Fix loading translation files for Maniac Mansion Mania games


Commit: bf185107272d7c07da36988dd56d8a6112a52edf
    https://github.com/scummvm/scummvm/commit/bf185107272d7c07da36988dd56d8a6112a52edf
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2021-06-27T12:05:43-07:00

Commit Message:
AGS: Fix loading translation files for Maniac Mansion Mania games

Changed paths:
    engines/ags/shared/util/data_ext.cpp


diff --git a/engines/ags/shared/util/data_ext.cpp b/engines/ags/shared/util/data_ext.cpp
index 1b8ca559a6..63a59389a7 100644
--- a/engines/ags/shared/util/data_ext.cpp
+++ b/engines/ags/shared/util/data_ext.cpp
@@ -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.",




More information about the Scummvm-git-logs mailing list