diff --git a/GL/platforms/sh4.c b/GL/platforms/sh4.c index 46e4e45..dd85432 100644 --- a/GL/platforms/sh4.c +++ b/GL/platforms/sh4.c @@ -202,8 +202,7 @@ void SceneListSubmit(void* src, int n) { /* If this was the last vertex in the strip, we need to flush the queue and then restart it again */ queue_head = (queue_head + 1) % queue_capacity; - counter--; - while(counter--) { + while(--counter) { // There are 3 vertices, so we push the first one _glPerspectiveDivideVertex(&queue[queue_head], h); _glSubmitHeaderOrVertex(d, &queue[queue_head]); diff --git a/tests/zclip/main.cpp b/tests/zclip/main.cpp index 4de4564..70292a7 100644 --- a/tests/zclip/main.cpp +++ b/tests/zclip/main.cpp @@ -203,8 +203,7 @@ void SceneListSubmit(void* src, int n) { /* If this was the last vertex in the strip, we need to flush the queue and then restart it again */ queue_head = (queue_head + 1) % queue_capacity; - counter--; - while(counter--) { + while(--counter) { // There are 3 vertices, so we push the first one _glPerspectiveDivideVertex(&queue[queue_head], h); _glSubmitHeaderOrVertex(d, &queue[queue_head]);