From 04fc1efbdb730d21207b1efe871fce95f58d18d6 Mon Sep 17 00:00:00 2001 From: xomachine Date: Tue, 8 Mar 2016 23:25:48 +0300 Subject: Workaround for #199 --- view.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'view.c') diff --git a/view.c b/view.c index 7f47f1a..877b705 100644 --- a/view.c +++ b/view.c @@ -520,8 +520,8 @@ void view_cursor_to(View *view, size_t pos) { * stop once the screen is full, update view->end, view->lastline */ void view_draw(View *view) { view_clear(view); - /* read a screenful of text */ - const size_t text_size = view->width * view->height; + /* read a screenful of text considering each character as 4-byte UTF character*/ + const size_t text_size = view->width * view->height * 4; /* current buffer to work with */ char text[text_size+1]; /* remaining bytes to process in buffer */ -- cgit v1.2.3