From 095ebf27901e3a321bcc139f037b0dc2fb9691f1 Mon Sep 17 00:00:00 2001 From: Luke Benstead Date: Sat, 22 Apr 2023 11:37:42 +0100 Subject: [PATCH] Fix final bug --- GL/platforms/sh4.c | 3 +-- tests/zclip/main.cpp | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) 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]);