[ scummvm-Patches-629413 ] DOTT: Fix for intro crash (regression)

noreply at sourceforge.net noreply at sourceforge.net
Sun Oct 27 15:51:19 CET 2002


Patches item #629413, was opened at 2002-10-27 15:51
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418822&aid=629413&group_id=37116

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Torbjörn Andersson (eriktorbjorn)
Assigned to: Nobody/Anonymous (nobody)
Summary: DOTT: Fix for intro crash (regression)

Initial Comment:
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.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418822&aid=629413&group_id=37116




More information about the Scummvm-tracker mailing list