Opened 11 years ago

Closed 11 years ago

Last modified 12 months ago

#3842 closed defect (fixed)

KYRA1: long savegame names cause garbage

Reported by: SF/clemty Owned by: lordhoto
Priority: normal Component: Engine: Kyra
Keywords: Cc:
Game: Kyrandia 1

Description

0.12.0svn, win32, kyra1 cd german

when giving a savegame a long name (until it's not possible to enter another character), something goes awry and the previous savegame name is appended. see attached screenshot

Ticket imported from: #2035459. Ticket imported from: bugs/3842.

Attachments (1)

kyra1-stringbug.png (56.7 KB ) - added by SF/clemty 11 years ago.
long string causes savegame name distortion

Download all attachments as: .zip

Change History (6)

by SF/clemty, 11 years ago

Attachment: kyra1-stringbug.png added

long string causes savegame name distortion

comment:1 by SF/clemty, 11 years ago

Owner: set to lordhoto

comment:2 by DrMcCoy, 11 years ago

Seems to me like
if (length < 31) {
in gui_lok.cpp:676 should be
if (length < 30) {
(_savegameName is 31 characters wide, so if it already has 30 characters, adding one will override the \0, which produces the noted effect)

Of course, now there may already be saves without a terminating \0 out in the wild...

comment:3 by lordhoto, 11 years ago

Fixed in HEAD and branch-0-12-0 now, thanks for reporting.

comment:4 by lordhoto, 11 years ago

Resolution: fixed
Status: newclosed

comment:5 by digitall, 12 months ago

Component: Engine: Kyra
Game: Kyrandia 1
Note: See TracTickets for help on using tickets.