summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Schröder <mls@suse.de>2022-01-04 03:34:47 +0200
committerAlexander Naumov <alexander_naumov@opensuse.org>2022-01-04 03:34:47 +0200
commit14dcf005dbe727d82024da8db862b02290717d5d (patch)
tree6c5e65a9e0858f93b05d1cbbfbacc3b97317a0fe
parent282ec62662b3eeb79d919db9c1dc549f45787e1a (diff)
downloadscreen-14dcf005dbe727d82024da8db862b02290717d5d.tar.gz
fix combining char handling that could lead to a segfault
-rw-r--r--src/ansi.c8
1 files 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