eina: eina_unicode_utf8_next_get should return 0

when one of the parameters is NULL to avoid null pointer access.
it also corresponds to the description in doc.

@fix
This commit is contained in:
Jaeun Choi 2015-04-08 21:29:13 +09:00
parent adbe2e864b
commit 15e11cb05f
1 changed files with 2 additions and 0 deletions

View File

@ -35,6 +35,8 @@ eina_unicode_utf8_next_get(const char *buf, int *iindex)
Eina_Unicode r;
unsigned char d;
if (!buf || !iindex) return 0;
ind = *iindex;
/* if this char is the null terminator, exit */