mirror of
https://github.com/microsoft/DirectXTex.git
synced 2025-07-11 20:50:13 +02:00
Fix BC6H crash from improper bounds checking (#109)
This commit is contained in:
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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user