This bug caused accessing array "GfxFrame[][]" out of bounds if level
position is not inside the playfield. (This is always the case when
invoked from "DrawScreenElementExt()" for level border elements.
return sync_frame % g->anim_frames;
}
- return getGraphicAnimationFrame(graphic, GfxFrame[lx][ly]);
+ int sync_frame = (IN_LEV_FIELD(lx, ly) ? GfxFrame[lx][ly] : -1);
+
+ return getGraphicAnimationFrame(graphic, sync_frame);
}
void getGraphicSourceBitmap(int graphic, int tilesize, Bitmap **bitmap)