From ab8ce45ab0a49b67ceeaab5c2da3434ca149eb34 Mon Sep 17 00:00:00 2001 From: Vincent Wei Date: Wed, 6 Jun 2018 09:41:32 +0800 Subject: [PATCH] debug for stain pixel of subpixel --- src/newgdi/glyph.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/newgdi/glyph.c b/src/newgdi/glyph.c index f7aa3fa9..58f1a9ff 100644 --- a/src/newgdi/glyph.c +++ b/src/newgdi/glyph.c @@ -378,12 +378,15 @@ static void prepare_bitmap (PDC pdc, int w, int h) char_bmp.bmBits = char_bits; if (size <= char_bits_size) { - return; + goto done; } char_bits_size = ((size + 31) >> 5) << 5; char_bits = realloc(char_bmp.bmBits, char_bits_size); char_bmp.bmBits = char_bits; + +done: + memset (char_bmp.bmBits, 0, char_bits_size); } static Uint32 allocated_size = 0;