Alexandre Julliard : gdi32: Properly fail mapping glyph for invalid characters in fonts without encoding.

Alexandre Julliard julliard at winehq.org
Mon Dec 14 15:51:17 CST 2020


Module: wine
Branch: master
Commit: a0559ad5c3678527f7153da7f9e069ca05236b52
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=a0559ad5c3678527f7153da7f9e069ca05236b52

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Dec 14 16:55:14 2020 +0100

gdi32: Properly fail mapping glyph for invalid characters in fonts without encoding.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50252
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/gdi32/font.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c
index 764eb110086..00bbeb0a11f 100644
--- a/dlls/gdi32/font.c
+++ b/dlls/gdi32/font.c
@@ -2919,6 +2919,8 @@ static UINT get_glyph_index( struct gdi_font *font, UINT glyph )
         glyph = (unsigned char)ch;
         font_funcs->get_glyph_index( font, &glyph, FALSE );
     }
+    else return 0;
+
     return glyph;
 }
 




More information about the wine-cvs mailing list