Fix read past end of images array when images changes from imagesBurningResource to imagesResource.

Fixes ticket:2423.
master
Cyp 2011-03-20 04:16:02 +01:00
parent 12e1d13c6c
commit f2606e0c85
1 changed files with 2 additions and 1 deletions

View File

@ -3144,9 +3144,10 @@ void drawRadarBlips(int radarX, int radarY, float pixSizeH, float pixSizeV)
// Draw animated
if (realTime - psProxDisp->timeLastDrawn > delay)
{
psProxDisp->strobe = (psProxDisp->strobe + 1) % animationLength;
++psProxDisp->strobe;
psProxDisp->timeLastDrawn = realTime;
}
psProxDisp->strobe %= animationLength;
imageID = images[1 + psProxDisp->strobe];
}