summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2009-02-01 18:07:55 +0100
committerSebastien Helleu <flashcode@flashtux.org>2009-02-01 18:07:55 +0100
commit7e12f8596a501323c8e9f889ed1c2f4080e8cd0e (patch)
tree3f2f07739dc5b1b800da5f8acc64025f7ccf3d6c
parent9ae942bb9d870821af7bd20726f801137f761aff (diff)
downloadweechat-7e12f8596a501323c8e9f889ed1c2f4080e8cd0e.zip
Fix crash when input bar contains UTF-8 wide chars (larger than screen) (bug #25443)
-rw-r--r--src/gui/curses/gui-curses-bar-window.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/curses/gui-curses-bar-window.c b/src/gui/curses/gui-curses-bar-window.c
index a874f0122..a10f3c49c 100644
--- a/src/gui/curses/gui-curses-bar-window.c
+++ b/src/gui/curses/gui-curses-bar-window.c
@@ -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);