From 295536ae98cb88bfa551ac73ae2e19a8c2ddfc88 Mon Sep 17 00:00:00 2001
From: Aleric Inglewood <Aleric.Inglewood@gmail.com>
Date: Mon, 24 Jan 2011 09:35:41 -0500
Subject: [PATCH] VWR-24321: fix validation of textures that start with 00

---
 doc/contributions.txt            | 1 +
 indra/newview/lltexturecache.cpp | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/doc/contributions.txt b/doc/contributions.txt
index 5255acc0418..4e91bbdd362 100644
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -83,6 +83,7 @@ Aleric Inglewood
 	VWR-24315
 	VWR-24317
 	VWR-24320
+    VWR-24321
  	VWR-24354
 	VWR-24519
 	SNOW-84
diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp
index 92080d1fd75..6ddbdbf7837 100644
--- a/indra/newview/lltexturecache.cpp
+++ b/indra/newview/lltexturecache.cpp
@@ -1592,7 +1592,7 @@ void LLTextureCache::purgeTextures(bool validate)
 	if (validate)
 	{
 		validate_idx = gSavedSettings.getU32("CacheValidateCounter");
-		U32 next_idx = (++validate_idx) % 256;
+		U32 next_idx = (validate_idx + 1) % 256;
 		gSavedSettings.setU32("CacheValidateCounter", next_idx);
 		LL_DEBUGS("TextureCache") << "TEXTURE CACHE: Validating: " << validate_idx << LL_ENDL;
 	}
-- 
GitLab