mirror of
https://github.com/yuzu-emu/FasTC.git
synced 2024-11-23 20:25:49 +01:00
Add additional error check.
This commit is contained in:
parent
be24a67bfc
commit
8b9849182a
@ -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 New Issue
Block a user