Opened 8 years ago

Closed 8 years ago

#5654 closed defect (fixed)

SCI: segfault when using the debugger 'version' command

Reported by: SF/vcappe Owned by: bluegr
Priority: normal Component: Engine: SCI
Keywords: Cc:
Game: Quest for Glory 3

Description

this happens in both qfg3 and qfg1vga (and, i suspect, in every SCI1.1 game).

it's because Console::cmdGetVersion() in engines/sci/console.cpp does:
DebugPrintf("View type: %s\n", viewTypeDesc[g_sci->getResMan()->getViewType()]);

but the char* viewTypeDesc[] (defined earlier in the function) is not quite correct. it is:
const char *viewTypeDesc[] = { "Unknown", "EGA", "VGA", "VGA SCI1.1", "Amiga" };

but the enum ViewType in engines/sci/graphics/helpers.h, suggest it should really be something like:
const char *viewTypeDesc[] = { "Unknown", "EGA", "Amiga ECS (32)", "Amiga AGA (64)", "VGA", "VGA SCI1.1" }

changing it to that make the segfault go away and print "ViewType: SCI 1.1" with qfg3 and qfg1vga.

Ticket imported from: #3291429. Ticket imported from: bugs/5654.

Change History (2)

comment:1 by bluegr, 8 years ago

Owner: set to bluegr
Resolution: fixed
Status: newclosed

comment:2 by bluegr, 8 years ago

Thanks, my mistake, missed that array.

Fixed in rev ce70457

Note: See TracTickets for help on using tickets.