1
0
mirror of https://github.com/microsoft/DirectXTex synced 2024-11-14 08:31:05 +00:00

Fix BC6H crash from improper bounds checking (#109)

This commit is contained in:
Eric Lasota 2018-07-02 14:37:05 -04:00 committed by Chuck Walbourn
parent 5004dd770c
commit 3b13358138

View File

@ -1318,7 +1318,7 @@ namespace
uint32_t iStep;
if (fDot <= 0.0f)
iStep = 0;
if (fDot >= fSteps)
else if (fDot >= fSteps)
iStep = cSteps - 1;
else
iStep = uint32_t(fDot + 0.5f);
@ -1504,7 +1504,7 @@ namespace
uint32_t iStep;
if (fDot <= 0.0f)
iStep = 0;
if (fDot >= fSteps)
else if (fDot >= fSteps)
iStep = cSteps - 1;
else
iStep = uint32_t(fDot + 0.5f);