summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2012-10-19 01:51:07 +0000
committerCedric BAIL <cedric.bail@free.fr>2012-10-19 01:51:07 +0000
commit7a132e9c086dc5c6b3aafe83d878e74aad041291 (patch)
tree0bcbeaa03abc8d70a307fa1759edce257d059695
parentdf8fb6d9892750666882339ba1770ccdf3e96e0f (diff)
efl: backport r78215.
SVN revision: 78217
-rw-r--r--src/lib/eina/eina_unicode.c4
-rw-r--r--src/lib/eina/eina_unicode.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/eina/eina_unicode.c b/src/lib/eina/eina_unicode.c
index 75059069c6..a1993de697 100644
--- a/src/lib/eina/eina_unicode.c
+++ b/src/lib/eina/eina_unicode.c
@@ -193,13 +193,15 @@ eina_unicode_escape(const Eina_Unicode *str)
193EAPI Eina_Unicode 193EAPI Eina_Unicode
194eina_unicode_utf8_get_next(const char *buf, int *iindex) 194eina_unicode_utf8_get_next(const char *buf, int *iindex)
195{ 195{
196 int ind = *iindex; 196 int ind;
197 Eina_Unicode r; 197 Eina_Unicode r;
198 unsigned char d; 198 unsigned char d;
199 199
200 EINA_SAFETY_ON_NULL_RETURN_VAL(buf, 0); 200 EINA_SAFETY_ON_NULL_RETURN_VAL(buf, 0);
201 EINA_SAFETY_ON_NULL_RETURN_VAL(iindex, 0); 201 EINA_SAFETY_ON_NULL_RETURN_VAL(iindex, 0);
202 202
203 ind = *iindex;
204
203 /* if this char is the null terminator, exit */ 205 /* if this char is the null terminator, exit */
204 if ((d = buf[ind++]) == 0) return 0; 206 if ((d = buf[ind++]) == 0) return 0;
205 207
diff --git a/src/lib/eina/eina_unicode.h b/src/lib/eina/eina_unicode.h
index 1b3ed15766..705ec7ba02 100644
--- a/src/lib/eina/eina_unicode.h
+++ b/src/lib/eina/eina_unicode.h
@@ -128,7 +128,7 @@ EAPI Eina_Unicode *eina_unicode_escape(const Eina_Unicode *str) EINA_ARG_NONNULL
128 * 128 *
129 * @param buf the string 129 * @param buf the string
130 * @param iindex the index to look at and return by. 130 * @param iindex the index to look at and return by.
131 * @return the codepoint found. 131 * @return the codepoint found, 0 if @p buf or @p iindex are NULL
132 * @since 1.1.0 132 * @since 1.1.0
133 */ 133 */
134EAPI Eina_Unicode eina_unicode_utf8_get_next(const char *buf, int *iindex) EINA_ARG_NONNULL(1, 2); 134EAPI Eina_Unicode eina_unicode_utf8_get_next(const char *buf, int *iindex) EINA_ARG_NONNULL(1, 2);