Fix small bug

This commit is contained in:
Pavel Krajcevski 2015-04-11 14:27:23 -07:00
parent 16dd6c2af2
commit acd986d6b7

View File

@ -76,7 +76,7 @@ class Indexer {
int32 r;
switch(m_WrapMode) {
case eWrapMode_Clamp:
r = static_cast<uint32>(std::max(0, std::min(i, l)));
r = static_cast<uint32>(std::max(0, std::min(i, l-1)));
break;
case eWrapMode_Wrap: