[Scummvm-tracker] [ScummVM :: Bugs] #13417: AGS: Invalid savegames created on big-endian systems

ScummVM :: Bugs trac at scummvm.org
Sat Feb 11 11:12:01 UTC 2023


#13417: AGS: Invalid savegames created on big-endian systems
-------------------------------------------------+-------------------------
Reporter:  kas1e                                 |       Owner:  (none)
    Type:  defect                                |      Status:  new
Priority:  high                                  |   Component:  Engine:
                                                 |  AGS
 Version:                                        |  Resolution:
Keywords:  big endian, BE, AGS, saves,           |        Game:  Space
  savegames                                      |  Quest 5
-------------------------------------------------+-------------------------
Comment (by lephilousophe):

 After some digging, the code here matches what is in the official project:
 https://github.com/adventuregamestudio/ags/blob/master/Common/util/datastream.cpp

 IMO, there is a mixup in this code: EOS should be checked at reading and
 not at writing.
 For example in musl libc, EOF flag is only set in read operations and
 never on write.
 So EOS() should never return true when writing a file.

 There is a bug in our code (in engines/ags/shared/util/file_stream.cpp, at
 line 67).
 We return true for EOS() when stream is not a read stream.
 I pushed PR [https://github.com/scummvm/scummvm/pull/4700 #4700] for this.
-- 
Ticket URL: <https://bugs.scummvm.org/ticket/13417#comment:7>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM


More information about the Scummvm-tracker mailing list