From facdbe9d1c505cc57485f84776eb4bce62fd1733 Mon Sep 17 00:00:00 2001 From: Pavel Krajcevski Date: Mon, 3 Nov 2014 17:14:29 -0500 Subject: [PATCH] Fix another small bug --- ASTCEncoder/src/Decompressor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);