summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2018-06-02 15:17:59 +0200
committerSébastien Helleu <flashcode@flashtux.org>2018-06-02 15:18:29 +0200
commitba19fa9963ae5c760091a24d32c759d7b42dd748 (patch)
tree3676f4ffbbe74ae4e9681fa1a3faedcbdd94759b /src
parent39a291bc538a95f650811b08d91056b8353ed81c (diff)
downloadweechat-ba19fa9963ae5c760091a24d32c759d7b42dd748.zip
core: count number of chars instead of bytes for suffix in function string_cut
Diffstat (limited to 'src')
-rw-r--r--src/core/wee-string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/wee-string.c b/src/core/wee-string.c
index 4a2955396..f1231bb6b 100644
--- a/src/core/wee-string.c
+++ b/src/core/wee-string.c
@@ -134,7 +134,7 @@ string_cut (const char *string, int length, int count_suffix, int screen,
if (screen)
length -= utf8_strlen_screen (cut_suffix);
else
- length -= length_cut_suffix;
+ length -= utf8_strlen (cut_suffix);
if (length < 0)
return strdup ("");
if (screen)