mirror of
https://github.com/yuzu-emu/FasTC
synced 2024-11-22 16:13:39 +00:00
Add additional error check.
This commit is contained in:
parent
be24a67bfc
commit
8b9849182a
1 changed files with 7 additions and 0 deletions
|
@ -304,6 +304,13 @@ namespace ASTCC {
|
||||||
BitStreamReadOnly strm(inBuf);
|
BitStreamReadOnly strm(inBuf);
|
||||||
TexelWeightParams weightParams = DecodeBlockInfo(strm);
|
TexelWeightParams weightParams = DecodeBlockInfo(strm);
|
||||||
|
|
||||||
|
// Was there an error?
|
||||||
|
if(weightParams.m_bError) {
|
||||||
|
assert(!"Invalid block mode");
|
||||||
|
FillError(outBuf, blockWidth, blockHeight);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(weightParams.m_Width > blockWidth) {
|
if(weightParams.m_Width > blockWidth) {
|
||||||
assert(!"Texel weight grid width should be smaller than block width");
|
assert(!"Texel weight grid width should be smaller than block width");
|
||||||
FillError(outBuf, blockWidth, blockHeight);
|
FillError(outBuf, blockWidth, blockHeight);
|
||||||
|
|
Loading…
Reference in a new issue