1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-27 13:26:38 +02:00

Fix crash when input bar contains UTF-8 wide chars (larger than screen) (bug #25443)

This commit is contained in:
Sebastien Helleu
2009-02-01 18:07:55 +01:00
parent 9ae942bb9d
commit 7e12f8596a
+1 -1
View File
@@ -490,7 +490,7 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window,
diff = length_screen_before_cursor - chars_available;
if (diff > 0)
{
new_start_input = gui_chat_string_add_offset (pos_start_input, diff);
new_start_input = pos_start_input + gui_chat_string_real_pos (pos_start_input, diff);
if (pos_cursor && (new_start_input > pos_cursor))
new_start_input = pos_cursor;
memmove (pos_start_input, new_start_input, strlen (new_start_input) + 1);