Opened 8 years ago

Closed 8 years ago

#5800 closed defect (fixed)

SCI: QFG1EGA inventory items truncated

Reported by: SF/blazingstix Owned by: wjp
Priority: normal Component: Engine: SCI
Keywords: Cc:
Game: Quest for Glory 1


in scummvm version 1.4.0git1074-g5a1d0ab, (win32 daily build jul 16, 2011), when playing quest for glory 1 ega v1.200 (the one included in the collection/anthology cd) inventory items with "of" in their name get truncated on the inventory display screen.
for example:
Piece of Paper
String of Pearls
Flask of Water
all show as:

Ticket imported from: #3368821. Ticket imported from: bugs/5800.

Attachments (1)

qfg1.001 (32.6 KB) - added by SF/blazingstix 8 years ago.
saved game with problem

Download all attachments as: .zip

Change History (12)

comment:1 Changed 8 years ago by wjp

Summary: QFG1EGA inventory items truncatedSCI: QFG1EGA inventory items truncated

comment:2 Changed 8 years ago by digitall

blazingstix: Please can you attach a savegame which demonstrates this issue?
Also, can you confirm if this occurs in the current stable release i.e. v1.3.1 ?

Changed 8 years ago by SF/blazingstix

Attachment: qfg1.001 added

saved game with problem

comment:3 Changed 8 years ago by SF/blazingstix

the problem also exists in the latest stable release (v1.3.1).

I've uploaded a saved game. once it's loaded, you can press TAB to see the inventory screen.

comment:4 Changed 8 years ago by digitall

Thanks you for this help.

I'll try and see whether this is a regression from an earlier release i.e. v1.2.0, v1.2.1, v1.3.0 and then bisect with Git to locate.

Though this was not indicated during as of SVN r51733, so this is likely..

comment:5 Changed 8 years ago by digitall

Hmm.. v1.3.0 shows this issue with the attached savegame, but the v1.2.* can't load this as the savegame format has changed.

blazingstix: Do you have / Could you use, v1.2.1 to make another savegame demonstrating this issue, since this would help.

comment:6 Changed 8 years ago by digitall

Tried ./scummvm --debugflags=OnStartup, Strings to look at this.
This shows that the string in question is "Formatting "Flask%c of Water", but is being displayed as Flask.
This code is in scummvm/engines/sci/engine/kstring.cpp within the kFormat function.
It is likely that the expected parameter is being read as NULL, resulting in the string being terminated.

One of the SCI devs will need to confirm what exactly is going on here.
One further piece of work would be to check the original interpreter behaviour under DOSBox.

comment:7 Changed 8 years ago by SF/blazingstix

Behaviour can be quickly reproduced in game. After starting a new game, immediately head to the tavern (1 screen up, 1 screen left, enter tavern) and "pick up paper" in front of middle stool.

I can also confirm that original interpreter does not truncate items with "of" in them.

comment:8 Changed 8 years ago by digitall

blazingstix: Thanks. I can confirm as well that this bug is present in v1.2.0 and v1.2.1 i.e. since introduction of SCI engine.

It looks like the parameter to kFormat is 0/NULL so the string is truncated. It will need a SCI engine developer to disassemble the script code and work out why we have a difference here, but we have sufficient information to progress this bug. Please standby and thanks.

comment:9 Changed 8 years ago by digitall

Owner: set to wjp

comment:10 Changed 8 years ago by wjp

Fixed in 85a056f382. Thanks for the report!

comment:11 Changed 8 years ago by wjp

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.