diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/viewport.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/viewport.cpp b/src/viewport.cpp index b724c60a5..7d6b22ac6 100644 --- a/src/viewport.cpp +++ b/src/viewport.cpp @@ -1337,10 +1337,13 @@ static void ViewportDrawTileSprites(const TileSpriteToDrawVector *tstdv) static void ViewportSortParentSprites(ParentSpriteToDraw *psd[]) { - for (; *psd != NULL; psd++) { + while (*psd != NULL) { ParentSpriteToDraw *ps = *psd; - if (ps->comparison_done) continue; + if (ps->comparison_done) { + psd++; + continue; + } ps->comparison_done = true; |