1 more valgrind bitch gone. i know pos shouldnt exceed string array

bounds by logic but it crept through - this protects if it does.



SVN revision: 70458
This commit is contained in:
Carsten Haitzler 2012-04-25 08:26:05 +00:00
parent fca120e8cc
commit fb8f30b2ac
1 changed files with 2 additions and 0 deletions

View File

@ -7411,7 +7411,9 @@ _evas_textblock_cursor_is_at_the_end(const Evas_Textblock_Cursor *cur)
if (!cur) return EINA_FALSE;
if (!cur->node) return EINA_FALSE;
if (cur->pos < 0) return EINA_FALSE;
text = eina_ustrbuf_string_get(cur->node->unicode);
if ((cur->pos - 1) > eina_ustrbuf_length_get(cur->node->unicode)) return EINA_FALSE;
return ((text[cur->pos] == 0) && (!EINA_INLIST_GET(cur->node)->next)) ?
EINA_TRUE : EINA_FALSE;
}