[Scummvm-tracker] [ScummVM :: Bugs] #15382: ADL: HIRES5: Crash printing an apparently corrupt string

ScummVM :: Bugs trac at scummvm.org
Fri Sep 27 12:04:32 UTC 2024


#15382: ADL: HIRES5: Crash printing an apparently corrupt string
-------------------------+---------------------------------------------
Reporter:  eriktorbjorn  |       Owner:  (none)
    Type:  defect        |      Status:  new
Priority:  normal        |   Component:  Engine: ADL
 Version:                |  Resolution:
Keywords:                |        Game:  Hi-Res Adventure #5: Time Zone
-------------------------+---------------------------------------------
Comment (by eriktorbjorn):

 Maybe the first one can be addressed simply like this:

 {{{
 diff --git a/engines/adl/adl_v2.cpp b/engines/adl/adl_v2.cpp
 index c8a76c3e46d..91a79d28c48 100644
 --- a/engines/adl/adl_v2.cpp
 +++ b/engines/adl/adl_v2.cpp
 @@ -364,6 +364,9 @@ Common::DataBlockPtr
 AdlEngine_v2::readDataBlockPtr(Common::ReadStream &f) const
         if (track == 0 && sector == 0 && offset == 0 && size == 0)
                 return Common::DataBlockPtr();

 +       if (track == 255 && sector == 255 && offset == 255 && size == 255)
 +               return Common::DataBlockPtr();
 +
         adjustDataBlockPtr(track, sector, offset, size);

         return _disk->getDataBlock(track, sector, offset, size);
 }}}

 That means nothing will be printed, because loadMessage() falls back to
 printing an empty string. That could be changed, but I don't know if there
 are cases where it's ''supposed'' to print an empty string there?
-- 
Ticket URL: <https://bugs.scummvm.org/ticket/15382#comment:4>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM


More information about the Scummvm-tracker mailing list