[Scummvm-tracker] [ScummVM] #10515: SCI game "Manic Mansion" doesn't work on current build

David Turner trac at scummvm.org
Sun Nov 11 08:52:51 CET 2018


#10515: SCI game "Manic Mansion" doesn't work on current build
--------------------------+-------------------------
  Reporter:  lordelan     |      Owner:  (none)
      Type:  defect       |     Status:  new
  Priority:  normal       |  Component:  Engine: SCI
Resolution:               |   Keywords:
      Game:  SCI Fanmade  |
--------------------------+-------------------------

Comment (by digitall):

 I suspect the fix will be:
 {{{
 diff --git a/engines/advancedDetector.cpp b/engines/advancedDetector.cpp
 index 6f4efcfb57..26b06b6417 100644
 --- a/engines/advancedDetector.cpp
 +++ b/engines/advancedDetector.cpp
 @@ -91,7 +91,11 @@ DetectedGame AdvancedMetaEngine::toDetectedGame(const
 ADDetec
 tedGame &adGame) co
                 extra = "";
         } else {
                 const PlainGameDescriptor *pgd =
 findPlainGameDescriptor(desc->g
 ameId, _gameIds);
 -               title = pgd->description;
 +               if (pgd) {
 +                       title = pgd->description;
 +               } else {
 +                       title = "";
 +               }
                 extra = desc->extra;
         }

 }}}

 The findPlainGameDescriptor returns nullptr when the game id is not found
 in the plain game id list supplied by the meta engine, thus dereferencing
 this causes a segfault crash.

 I thought that the issue might be that desc->gameId should be gameId in
 the findPlainGameDescriptor call, but testing shows that removes the game
 name in some cases, so better to just fix the code to supply an empty
 title in these cases which is what the original "good" cases did.

--
Ticket URL: <https://bugs.scummvm.org/ticket/10515#comment:6>
ScummVM <https://bugs.scummvm.org>
ScummVM


More information about the Scummvm-tracker mailing list