From f122223809e409b1dfffdb98055e14ba9dc45909 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Sun, 12 Feb 2017 10:49:28 -0800 Subject: [PATCH] proper byte output --- book.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book.c b/book.c index c71fad9..ae2991c 100644 --- a/book.c +++ b/book.c @@ -249,7 +249,7 @@ static void entry_encode(json_t* entry_json, const Book_Entry* entry, int flags) static void font_glyph_encode(json_t* glyph_json, const Book_Glyph* glyph, int bitmap_size) { json_t* bitmap_json_array = json_array(); for (int i = 0; i < bitmap_size; ++i) { - json_array_append_new(bitmap_json_array, json_integer(glyph->bitmap[i])); + json_array_append_new(bitmap_json_array, json_integer((unsigned char)glyph->bitmap[i])); } json_object_set_new(glyph_json, "bitmap", bitmap_json_array);