#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 |
Description
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)
Change History (3)
by , 23 years ago
| Attachment: | dott-regression.diff added |
|---|
comment:1 by , 23 years ago
| Owner: | set to |
|---|---|
| Status: | new → closed |
comment:2 by , 7 years ago
| Component: | → Engine: SCUMM |
|---|---|
| Game: | → Day of the Tentacle |

Patch against an October 26 CVS snapshot