forked from enlightenment/terminology
re-fix wrodsep to work again and not segv
This commit is contained in:
parent
cd0bfa5d0c
commit
149d23d484
|
@ -2599,6 +2599,7 @@ _codepoint_is_wordsep(const Eina_Unicode g)
|
||||||
};
|
};
|
||||||
size_t imax = (sizeof(wordsep) / sizeof(wordsep[0])) - 1,
|
size_t imax = (sizeof(wordsep) / sizeof(wordsep[0])) - 1,
|
||||||
imin = 0;
|
imin = 0;
|
||||||
|
size_t imaxmax = imax;
|
||||||
|
|
||||||
while (imax >= imin)
|
while (imax >= imin)
|
||||||
{
|
{
|
||||||
|
@ -2607,7 +2608,7 @@ _codepoint_is_wordsep(const Eina_Unicode g)
|
||||||
if (wordsep[imid] == g) return EINA_TRUE;
|
if (wordsep[imid] == g) return EINA_TRUE;
|
||||||
else if (wordsep[imid] < g) imin = imid + 1;
|
else if (wordsep[imid] < g) imin = imid + 1;
|
||||||
else imax = imid - 1;
|
else imax = imid - 1;
|
||||||
if ((imax == imin) || (imid == 0)) break;
|
if (imax > imaxmax) break;
|
||||||
}
|
}
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue