diff --git a/ASTCEncoder/src/Decompressor.cpp b/ASTCEncoder/src/Decompressor.cpp index b50d1dc..b7dd85a 100644 --- a/ASTCEncoder/src/Decompressor.cpp +++ b/ASTCEncoder/src/Decompressor.cpp @@ -312,7 +312,7 @@ namespace ASTCC { while(--range > 0) { IntegerEncodedValue val = IntegerEncodedValue::CreateEncoding(range); uint32 bitLength = val.GetBitLength(nValues); - if(bitLength < nBitsForColorData) { + if(bitLength <= nBitsForColorData) { // Find the smallest possible range that matches the given encoding while(--range > 0) { IntegerEncodedValue newval = IntegerEncodedValue::CreateEncoding(range);