[Scummvm-tracker] [ScummVM :: Bugs] #11954: Commit 54b0b4ac4cd4a42de660ea426edb27840ddfd4f0 breaks Myst ME

ScummVM :: Bugs trac at scummvm.org
Fri Nov 27 13:06:36 UTC 2020


#11954: Commit 54b0b4ac4cd4a42de660ea426edb27840ddfd4f0 breaks Myst ME
-------------------------+-------------------------------------------------
  Reporter:  naatje80    |      Owner:  (none)
      Type:  defect      |     Status:  new
  Priority:  normal      |  Component:  Engine: Mohawk
Resolution:              |   Keywords:  scummvm copyRectToScreen core dump
      Game:              |  myst
-------------------------+-------------------------------------------------
Comment (by eriktorbjorn):

 The problem seems to be this bit in the MystAreaVideo constructor (see
 myst_areas.cpp):

 {{{
         do {
                 c = rlstStream->readByte();
                 _videoFile += c;
         } while (c);

         rlstStream->skip(_videoFile.size() & 1);
 }}}

 In your example, it will read the string "/qtw/myst/vlt1watr" into
 videoFile.

 Before the str-common.cpp change, _videoFile.size() was 19 because it
 apparently counts the string terminator. It would therefore skip the next
 byte of the stream.

 After the change, _videoFile.size() is 18 because the terminator isn't
 included in the count. It won't skip anything, and everything it reads
 from the stream after that will be just garbage.

 But I'm not sure what the correct fix is. The change to str-common.cpp was
 made because it broke other engines (I forget which, but I think Blade
 Runner may have been one of them), so simply reverting it probably isn't a
 good idea...
-- 
Ticket URL: <https://bugs.scummvm.org/ticket/11954#comment:3>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM


More information about the Scummvm-tracker mailing list