aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornoname@inventati.org <noname@inventati.org>2015-04-21 23:27:22 +0200
committerRoberto E. Vargas Caballero <k0ga@shike2.com>2015-04-27 08:58:37 +0200
commit61c35cd24625c6d14b4a2de8bd639da52aa513bd (patch)
treec85ebb726c0a1a6de37733459ab42bfe30d9c71c
parent742a41d6554ce1848f45ea89cb83d62c7e881352 (diff)
downloadst-61c35cd24625c6d14b4a2de8bd639da52aa513bd.tar.gz
Use utf8len instead of utf8decode.
-rw-r--r--st.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/st.c b/st.c
index b042be2..6371a85 100644
--- a/st.c
+++ b/st.c
@@ -3672,7 +3672,6 @@ drawregion(int x1, int y1, int x2, int y2) {
Glyph base, new;
char buf[DRAW_BUF_SIZ];
bool ena_sel = sel.ob.x != -1 && sel.alt == IS_SET(MODE_ALTSCREEN);
- long unicodep;
if(!(xw.state & WIN_VISIBLE))
return;
@@ -3701,7 +3700,7 @@ drawregion(int x1, int y1, int x2, int y2) {
base = new;
}
- sl = utf8decode(new.c, &unicodep, UTF_SIZ);
+ sl = utf8len(new.c);
memcpy(buf+ib, new.c, sl);
ib += sl;
ic += (new.mode & ATTR_WIDE)? 2 : 1;
remember that computers suck.