[Scummvm-git-logs] scummvm master -> 8011b2127a0ff91172a208c1c1545dff20b440a3
sev-
sev at scummvm.org
Tue May 5 12:06:29 UTC 2020
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
1a6ffd6398 SCUMM: Fixed reading malformed resources. Bug #11463
8011b2127a NEWS: Mention Apple //gs MM fix
Commit: 1a6ffd6398339a82e79817c065bb0ae926dd4b63
https://github.com/scummvm/scummvm/commit/1a6ffd6398339a82e79817c065bb0ae926dd4b63
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-05-05T14:06:20+02:00
Commit Message:
SCUMM: Fixed reading malformed resources. Bug #11463
Changed paths:
engines/scumm/resource.cpp
diff --git a/engines/scumm/resource.cpp b/engines/scumm/resource.cpp
index 597a291c95..6dccf99334 100644
--- a/engines/scumm/resource.cpp
+++ b/engines/scumm/resource.cpp
@@ -653,8 +653,14 @@ int ScummEngine::loadResource(ResType type, ResId idx) {
if ((_game.version == 3) && !(_game.platform == Common::kPlatformAmiga) && (type == rtSound)) {
return readSoundResourceSmallHeader(idx);
} else {
- size = _fileHandle->readUint16LE();
- _fileHandle->seek(-2, SEEK_CUR);
+ // WORKAROUND: Apple //gs MM has malformed sound resource #68
+ if (_fileHandle->pos() + 2 > _fileHandle->size()) {
+ warning("loadResource(%s,%d): resource is too short", nameOfResType(type), idx);
+ size = 0;
+ } else {
+ size = _fileHandle->readUint16LE();
+ _fileHandle->seek(-2, SEEK_CUR);
+ }
}
} else if (_game.features & GF_SMALL_HEADER) {
if (_game.version == 4)
Commit: 8011b2127a0ff91172a208c1c1545dff20b440a3
https://github.com/scummvm/scummvm/commit/8011b2127a0ff91172a208c1c1545dff20b440a3
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-05-05T14:06:20+02:00
Commit Message:
NEWS: Mention Apple //gs MM fix
Changed paths:
NEWS.md
diff --git a/NEWS.md b/NEWS.md
index 9ba1aab132..97b0b3f706 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -26,6 +26,7 @@ For a more comprehensive changelog of the latest experimental code, see:
- Replaced the existing NES palette to a more accurate NTSC palette based on Mesen.
- Added a new GUI option to switch to an alternative NES palette based on the NES Classic.
- Improved colors in Apple //gs Maniac Mansion.
+ - Fixed crash when entering garage in Apple //gs Maniac Mansion.
Sword1:
- Added support for localized menus in Novy Disk Russian Trilogy release.
More information about the Scummvm-git-logs
mailing list