jihoon pushed a commit to branch efl-1.11. http://git.enlightenment.org/core/efl.git/commit/?id=fe2ceaf1bffe9691dd85b88a7d1e06e58f8be455
commit fe2ceaf1bffe9691dd85b88a7d1e06e58f8be455 Author: Jihoon Kim <[email protected]> Date: Fri Oct 10 10:01:53 2014 +0900 ecore_imf/wayland: Use simple code to fix infinite loop bug related to ibus-hangul --- src/modules/ecore_imf/wayland/wayland_imcontext.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/modules/ecore_imf/wayland/wayland_imcontext.c b/src/modules/ecore_imf/wayland/wayland_imcontext.c index 70b8cab..c324d1a 100644 --- a/src/modules/ecore_imf/wayland/wayland_imcontext.c +++ b/src/modules/ecore_imf/wayland/wayland_imcontext.c @@ -82,17 +82,12 @@ utf8_offset_to_characters(const char *str, int offset) { int index = 0; unsigned int i = 0; - int len = 0; - - if (!str) return 0; - - len = strlen(str); - - if (offset > len) - offset = len; for (; index < offset; i++) - eina_unicode_utf8_next_get(str, &index); + { + if (eina_unicode_utf8_next_get(str, &index) == 0) + break; + } return i; } --
