mirror of
https://github.com/microsoft/DirectXTex.git
synced 2026-02-10 06:36:14 +01:00
Fix BC6H crash from improper bounds checking (#109)
This commit is contained in:
committed by
Chuck Walbourn
parent
5004dd770c
commit
3b13358138
@@ -1318,7 +1318,7 @@ namespace
|
|||||||
uint32_t iStep;
|
uint32_t iStep;
|
||||||
if (fDot <= 0.0f)
|
if (fDot <= 0.0f)
|
||||||
iStep = 0;
|
iStep = 0;
|
||||||
if (fDot >= fSteps)
|
else if (fDot >= fSteps)
|
||||||
iStep = cSteps - 1;
|
iStep = cSteps - 1;
|
||||||
else
|
else
|
||||||
iStep = uint32_t(fDot + 0.5f);
|
iStep = uint32_t(fDot + 0.5f);
|
||||||
@@ -1504,7 +1504,7 @@ namespace
|
|||||||
uint32_t iStep;
|
uint32_t iStep;
|
||||||
if (fDot <= 0.0f)
|
if (fDot <= 0.0f)
|
||||||
iStep = 0;
|
iStep = 0;
|
||||||
if (fDot >= fSteps)
|
else if (fDot >= fSteps)
|
||||||
iStep = cSteps - 1;
|
iStep = cSteps - 1;
|
||||||
else
|
else
|
||||||
iStep = uint32_t(fDot + 0.5f);
|
iStep = uint32_t(fDot + 0.5f);
|
||||||
|
|||||||
Reference in New Issue
Block a user