From 1c2a2231d6738af3c0014710f2bd2bf361198442 Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Fri, 10 Apr 2020 11:51:40 +0000 Subject: [PATCH] tight: Don't drop MSB when encoding rect size --- src/tight.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tight.c b/src/tight.c index dceffe5..33e8396 100644 --- a/src/tight.c +++ b/src/tight.c @@ -113,7 +113,7 @@ static void tight_encode_size(struct vec* dst, size_t size) if (size >= 128) vec_fast_append_8(dst, ((size >> 7) & 0x7f) | ((size >= 16384) << 7)); 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,