1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-03 08:13:14 +02:00

core: count number of chars instead of bytes for suffix in function string_cut

This commit is contained in:
Sébastien Helleu
2018-06-02 15:17:59 +02:00
parent 39a291bc53
commit ba19fa9963
3 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -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)