diff options
author | Torbjörn Andersson | 2013-01-27 09:38:01 +0100 |
---|---|---|
committer | Torbjörn Andersson | 2013-01-27 09:38:01 +0100 |
commit | 2dd0690d2648a67ab41185cd72d21d0425d3b9ca (patch) | |
tree | 54baced4a670b9ef5f1d35a0bedd28043bbc3be3 | |
parent | 354aa0f5f34d33e32b6f35bcbf4e6f18e2bac783 (diff) | |
download | scummvm-rg350-2dd0690d2648a67ab41185cd72d21d0425d3b9ca.tar.gz scummvm-rg350-2dd0690d2648a67ab41185cd72d21d0425d3b9ca.tar.bz2 scummvm-rg350-2dd0690d2648a67ab41185cd72d21d0425d3b9ca.zip |
SCUMM: Work around bug #3602239 ("Mac Loom crashes using opening...")
Skip music resources that don't have the "so" (song?) tag. It is
better than asserting, now that it turns out that they do exist.
-rw-r--r-- | engines/scumm/player_v3m.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/engines/scumm/player_v3m.cpp b/engines/scumm/player_v3m.cpp index e61463128a..bfb69fa508 100644 --- a/engines/scumm/player_v3m.cpp +++ b/engines/scumm/player_v3m.cpp @@ -147,7 +147,15 @@ bool Player_V3M::loadMusic(const byte *ptr) { return false; } - assert(ptr[4] == 's' && ptr[5] == 'o'); + if (ptr[4] != 's' || ptr[5] != 'o') { + // See bug #3602239 ("Mac Loom crashes using opening spell on + // gravestone"). Apparently there is more than one type of + // sound/music, and we only handle one of them at the moment. + // Fortunately it is the most common and important one. + warning("Player_V3M::loadMusic: Skipping unknown music type"); + resource.close(); + return false; + } uint i; for (i = 0; i < 5; i++) { |