re-fix wrodsep to work again and not segv

This commit is contained in:
Carsten Haitzler 2014-08-15 20:20:15 +09:00
parent cd0bfa5d0c
commit 149d23d484
1 changed files with 2 additions and 1 deletions

View File

@ -2599,6 +2599,7 @@ _codepoint_is_wordsep(const Eina_Unicode g)
};
size_t imax = (sizeof(wordsep) / sizeof(wordsep[0])) - 1,
imin = 0;
size_t imaxmax = imax;
while (imax >= imin)
{
@ -2607,7 +2608,7 @@ _codepoint_is_wordsep(const Eina_Unicode g)
if (wordsep[imid] == g) return EINA_TRUE;
else if (wordsep[imid] < g) imin = imid + 1;
else imax = imid - 1;
if ((imax == imin) || (imid == 0)) break;
if (imax > imaxmax) break;
}
return EINA_FALSE;
}