As suggested in https://github.com/google/woff2/pull/2, correct const for top 7 bits

This commit is contained in:
Roderick Sheeter
2014-11-24 07:11:04 -08:00
parent 2f727ecc83
commit 2b35420fa9
+1 -1
View File
@@ -107,7 +107,7 @@ bool ReadBase128(Buffer* buf, uint32_t* value) {
return FONT_COMPRESSION_FAILURE(); return FONT_COMPRESSION_FAILURE();
} }
// If any of the top seven bits are set then we're about to overflow. // If any of the top seven bits are set then we're about to overflow.
if (result & 0xe0000000) { if (result & 0xfe000000) {
return FONT_COMPRESSION_FAILURE(); return FONT_COMPRESSION_FAILURE();
} }
result = (result << 7) | (code & 0x7f); result = (result << 7) | (code & 0x7f);