Browse files

Fix read past end of images array when images changes from imagesBurn…

…ingResource to imagesResource.

Fixes ticket:2423.
  • Loading branch information...
1 parent 12e1d13 commit f2606e0c858184133f2fdb00782274b2414c4877 @Cyp Cyp committed Mar 20, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/intdisplay.cpp
View
3 src/intdisplay.cpp
@@ -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];
}

0 comments on commit f2606e0

Please sign in to comment.