forked from enlightenment/efl
Evas encoding: Fixed an issue with the return value of prev_get when at the start.
SVN revision: 57091
This commit is contained in:
parent
a01b8fa7ce
commit
3b7bc65841
|
@ -132,14 +132,14 @@ evas_common_encoding_utf8_get_prev(const char *buf, int *iindex)
|
||||||
|
|
||||||
int r;
|
int r;
|
||||||
int index = *iindex;
|
int index = *iindex;
|
||||||
/* although when index == 0 there's no previous char, we still want to get
|
|
||||||
* the current char */
|
|
||||||
if (index < 0)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
/* First obtain the codepoint at iindex */
|
/* First obtain the codepoint at iindex */
|
||||||
r = evas_common_encoding_utf8_get_next(buf, &index);
|
r = evas_common_encoding_utf8_get_next(buf, &index);
|
||||||
|
|
||||||
|
/* although when index == 0 there's no previous char, we still want to get
|
||||||
|
* the current char */
|
||||||
|
if (*iindex < 0)
|
||||||
|
return r;
|
||||||
|
|
||||||
/* Next advance iindex to previous codepoint */
|
/* Next advance iindex to previous codepoint */
|
||||||
index = *iindex;
|
index = *iindex;
|
||||||
index--;
|
index--;
|
||||||
|
|
Loading…
Reference in New Issue