diff --git a/DirectXTex/BC.cpp b/DirectXTex/BC.cpp index 627ae31..2989544 100644 --- a/DirectXTex/BC.cpp +++ b/DirectXTex/BC.cpp @@ -258,7 +258,7 @@ static void OptimizeRGB(_Out_ HDRColorA *pX, _Out_ HDRColorA *pY, size_t iStep; if(fDot <= 0.0f) iStep = 0; - if(fDot >= fSteps) + else if(fDot >= fSteps) iStep = cSteps - 1; else iStep = static_cast(fDot + 0.5f);