forked from enlightenment/efl
ecore_imf/wayland: fix infinite loop bug when ibus-hangul is used
When korean language was typed with ibus-hangul, wayland immodule falled into the infinite loop.
This commit is contained in:
parent
93b865767f
commit
d56c2654f3
|
@ -82,6 +82,14 @@ 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);
|
||||
|
|
Loading…
Reference in New Issue