[hackers] [st] Use utf8len instead of utf8decode. || noname_AT_inventati.org

From: <git_AT_suckless.org>
Date: Mon, 27 Apr 2015 12:22:36 +0200 (CEST)

commit 61c35cd24625c6d14b4a2de8bd639da52aa513bd
Author: noname_AT_inventati.org <noname_AT_inventati.org>
Date: Tue Apr 21 23:27:22 2015 +0200

    Use utf8len instead of utf8decode.

diff --git a/st.c b/st.c
index b042be2..6371a85 100644
--- a/st.c
+++ b/st.c
_AT_@ -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;
_AT_@ -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;
Received on Mon Apr 27 2015 - 12:22:36 CEST

This archive was generated by hypermail 2.3.0 : Mon Apr 27 2015 - 12:24:14 CEST