[Scummvm-tracker] [ScummVM] #10849: SCI: QFG4CD: Wrong message audio for Rusalka/flowers

Vhati trac at scummvm.org
Mon Dec 24 07:40:30 CET 2018


#10849: SCI: QFG4CD: Wrong message audio for Rusalka/flowers
--------------------------------+-------------------------
  Reporter:  sluicebox          |      Owner:  (none)
      Type:  defect             |     Status:  new
  Priority:  normal             |  Component:  Engine: SCI
Resolution:                     |   Keywords:  original
      Game:  Quest for Glory 4  |
--------------------------------+-------------------------

Comment (by Vhati):

 I fixed #10770 by making getRecord() substitute a hardcoded string. :D

 Pull request there includes language detection and an escaped non-ascii
 character.
 \\
 \\
 record.length is a straightforward character count (without a +1 for
 null). A small value doesn't truncate but good to fill in nonetheless.

 [https://github.com/scummvm/scummvm/blob/81288f2cac5773274ba09469552f48b5d3ca696f/engines/sci/engine/message.cpp#L125
 Source]: message.cpp - MessageReaderV4::findRecord()
 {{{
 const uint32 maxSize = _data.size() - stringOffset;
 record.string = (const char *)_data.getUnsafeDataAt(stringOffset,
 maxSize);
 record.length = Common::strnlen(record.string, maxSize);
 }}}

 [https://github.com/scummvm/scummvm/blob/81288f2cac5773274ba09469552f48b5d3ca696f/common/str.cpp#L1050
 Source]: str.cpp - strnlen()

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


More information about the Scummvm-tracker mailing list