From 073b8d0af3bf5ff3a9618541eef8b50f9a61029f Mon Sep 17 00:00:00 2001 From: Wanne Date: Sat, 10 Mar 2007 22:46:31 +0000 Subject: [PATCH] Declared a local variable that was missing. Project did not compile in VS 2005. I wonder how this could ever compile in previous versions ... git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@767 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Utils/Quantize.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Utils/Quantize.cpp b/Utils/Quantize.cpp index 72fef36a..c6cdda23 100644 --- a/Utils/Quantize.cpp +++ b/Utils/Quantize.cpp @@ -129,11 +129,14 @@ void CQuantizer::ReduceTree (UINT nColorBits, UINT* pLeafCount, // // Find the deepest level containing at least one reducible node. // - for (int i=nColorBits - 1; (i>0) && (pReducibleNodes[i] == NULL); i--); + int i = 0; + + for (i=nColorBits - 1; (i>0) && (pReducibleNodes[i] == NULL); i--); // // Reduce the node most recently added to the list at level i. // + NODE* pNode = pReducibleNodes[i]; pReducibleNodes[i] = pNode->pNext;