[Scummvm-tracker] [ScummVM :: Bugs] #13090: Build failure due ItemLocation array declaration

ScummVM :: Bugs trac at scummvm.org
Sat Dec 11 22:36:31 UTC 2021


#13090: Build failure due ItemLocation array declaration
-----------------------------+---------------------------------------------
Reporter:  fedor4ever        |       Owner:  sev-
    Type:  defect            |      Status:  new
Priority:  normal            |   Component:  Engine: Ultima
 Version:                    |  Resolution:
Keywords:  Symbian, build    |        Game:  Ultima IV: Quest of the Avatar
  error                      |
-----------------------------+---------------------------------------------
Comment (by digitall):

 I see that elf2e32 has been patched here:
 https://github.com/fedor4ever/elf2e32

 That validation error is emitted from only two places in the code:
 https://github.com/fedor4ever/elf2e32/blob/master/source/e32imagefile.cpp#L1095
 https://github.com/fedor4ever/elf2e32/blob/master/source/e32imagefile.cpp#L1098

 The iManager->E32ImageOutput() call will return "the name of the output
 E32 image output if provided as input through --output or nullptr":
 https://github.com/fedor4ever/elf2e32/blob/master/source/parametermanager.cpp#L831

 However, the Elf2e32Error::Elf2e32Error() constructor call takes the
 second parameter as a string and calls .c_str() on it with no check that
 it is not a nullptr:
 https://github.com/fedor4ever/elf2e32/blob/master/source/errorhandler.cpp#L97

 This causes the weird message of "line 427" above.

 I think this can be fixed by changing
 https://github.com/fedor4ever/elf2e32/blob/master/source/errorhandler.cpp#L99
 from:
 Message::GetInstance()->ReportMessage(ERROR, iMessageIndex,
 aName.c_str());
 to:
 Message::GetInstance()->ReportMessage(ERROR, iMessageIndex, aName ?
 aName.c_str() : "");
 And similarly for
 https://github.com/fedor4ever/elf2e32/blob/master/source/errorhandler.cpp#L104
 ...

 That will not fix this problem of compilation, but it will make the
 elf2e32 tool output more sane and reliable.
-- 
Ticket URL: <https://bugs.scummvm.org/ticket/13090#comment:6>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM


More information about the Scummvm-tracker mailing list