From c4c09c2966537ce249902a21b28e24fe78513332 Mon Sep 17 00:00:00 2001 From: walbourn_cp Date: Mon, 29 Jul 2013 13:33:52 -0700 Subject: [PATCH] DirectXTex: minor fix for BC1 encoder --- DirectXTex/BC.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);