From 14dcf005dbe727d82024da8db862b02290717d5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Schr=C3=B6der?= Date: Tue, 4 Jan 2022 03:34:47 +0200 Subject: fix combining char handling that could lead to a segfault --- src/ansi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ansi.c b/src/ansi.c index 2a52edd..27983bb 100644 --- a/src/ansi.c +++ b/src/ansi.c @@ -692,10 +692,6 @@ register int len; } curr->w_rend.font = 0; } -# ifdef DW_CHARS - if (curr->w_encoding == UTF8 && utf8_isdouble(c)) - curr->w_mbcs = 0xff; -# endif if (curr->w_encoding == UTF8 && c >= 0x0300 && utf8_iscomb(c)) { int ox, oy; @@ -730,6 +726,10 @@ register int len; } break; } +# ifdef DW_CHARS + if (curr->w_encoding == UTF8 && utf8_isdouble(c)) + curr->w_mbcs = 0xff; +# endif font = curr->w_rend.font; # endif # ifdef DW_CHARS -- cgit v1.2.1