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:
parent
5004dd770c
commit
3b13358138
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user