From 497915141b27cce267190d70794334dc8553e21c Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Sat, 9 Nov 2013 19:33:40 +0100 Subject: [PATCH] Revert to normal for loop in the index generator, the < 3 case gets taken care of properly. Just existing caused some issues. --- GPU/Common/IndexGenerator.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/GPU/Common/IndexGenerator.cpp b/GPU/Common/IndexGenerator.cpp index 49af66d7a3..02b3a1cb69 100644 --- a/GPU/Common/IndexGenerator.cpp +++ b/GPU/Common/IndexGenerator.cpp @@ -100,10 +100,9 @@ void IndexGenerator::AddList(int numVerts) { void IndexGenerator::AddStrip(int numVerts) { int wind = 1; const int numTris = numVerts - 2; - if (numTris < 0) return; u16 *outInds = inds_; int ibase = index_; - for (int i = numTris; i; i--) { + for (int i = 0; i < numTris; i++) { *outInds++ = ibase; *outInds++ = ibase + wind; wind ^= 3; // toggle between 1 and 2