tight: Don't drop MSB when encoding rect size

pull/30/head
Andri Yngvason 2020-04-10 11:51:40 +00:00
parent ee2adedfd1
commit 1c2a2231d6
1 changed files with 1 additions and 1 deletions

View File

@ -113,7 +113,7 @@ static void tight_encode_size(struct vec* dst, size_t size)
if (size >= 128) if (size >= 128)
vec_fast_append_8(dst, ((size >> 7) & 0x7f) | ((size >= 16384) << 7)); vec_fast_append_8(dst, ((size >> 7) & 0x7f) | ((size >= 16384) << 7));
if (size >= 16384) if (size >= 16384)
vec_fast_append_8(dst, (size >> 14) & 0x7f); vec_fast_append_8(dst, (size >> 14) & 0xff);
} }
int tight_encode_box_jpeg(struct tight_encoder* self, struct vec* dst, int tight_encode_box_jpeg(struct tight_encoder* self, struct vec* dst,