Stop trusting header totalSfntSize and glyf origLength

This commit is contained in:
Rod Sheeter
2016-03-08 12:30:08 -08:00
parent 643c7b4589
commit b220918cab
12 changed files with 726 additions and 526 deletions
+1 -2
View File
@@ -58,8 +58,7 @@ inline void Store16(int val, size_t* offset, uint8_t* dst) {
((val & 0xFF) << 8) | ((val & 0xFF00) >> 8);
*offset += 2;
#elif (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__))
*reinterpret_cast<uint16_t*>(dst + *offset) =
static_cast<uint16_t>(val);
*reinterpret_cast<uint16_t*>(dst + *offset) = static_cast<uint16_t>(val);
*offset += 2;
#else
dst[(*offset)++] = val >> 8;