Opened 21 years ago

Closed 21 years ago

Last modified 5 years ago

#8111 closed patch

DOTT: Fix for intro crash (regression)

Reported by: eriktorbjorn Owned by: aquadran
Priority: normal Component: Engine: SCUMM
Version: Keywords:
Cc: Game: Day of the Tentacle


I don't know if this is the right fix - and it uses 'goto' - but...

In recent CVS snapshots, the DOTT intro crashes with a failed assertion right after Dr. Fred says "To the time machine!" This bug was introduced when the following line

if ((uint) sx >= NUM_STRIPS)

was changed into

if (sx >= _numStrips)

This breaks because sx may be a negative number, so to preserve the old behaviour it should really be

if (sx < 0 || sx >= _numStrips)

But this condition is used to terminate the loop, which doesn't make sense to me in the case where sx < 0. Shouldn't it skip to the next iteration, in case sx becomes >= 0 later on? I don't have any test case to demonstrate this, so I don't know if it makes any practical difference.

Ticket imported from: #629413. Ticket imported from: patches/216.

Attachments (1)

dott-regression.diff (504 bytes ) - added by eriktorbjorn 21 years ago.
Patch against an October 26 CVS snapshot

Download all attachments as: .zip

Change History (3)

by eriktorbjorn, 21 years ago

Attachment: dott-regression.diff added

Patch against an October 26 CVS snapshot

comment:1 by aquadran, 21 years ago

Owner: set to aquadran
Status: newclosed

comment:2 by digitall, 5 years ago

Component: Engine: SCUMM
Game: Day of the Tentacle
Note: See TracTickets for help on using tickets.