From acd986d6b75fbc16735c77b8d922594ad256b084 Mon Sep 17 00:00:00 2001 From: Pavel Krajcevski Date: Sat, 11 Apr 2015 14:27:23 -0700 Subject: [PATCH] Fix small bug --- PVRTCEncoder/src/Indexer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVRTCEncoder/src/Indexer.h b/PVRTCEncoder/src/Indexer.h index da4537b..2253183 100644 --- a/PVRTCEncoder/src/Indexer.h +++ b/PVRTCEncoder/src/Indexer.h @@ -76,7 +76,7 @@ class Indexer { int32 r; switch(m_WrapMode) { case eWrapMode_Clamp: - r = static_cast(std::max(0, std::min(i, l))); + r = static_cast(std::max(0, std::min(i, l-1))); break; case eWrapMode_Wrap: