diff options
Diffstat (limited to 'source/blender/blenlib/intern/string_utf8.c')
-rw-r--r-- | source/blender/blenlib/intern/string_utf8.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenlib/intern/string_utf8.c b/source/blender/blenlib/intern/string_utf8.c index 17fb451e422..4fb8311048f 100644 --- a/source/blender/blenlib/intern/string_utf8.c +++ b/source/blender/blenlib/intern/string_utf8.c @@ -55,11 +55,11 @@ ptrdiff_t BLI_str_utf8_invalid_byte(const char *str, size_t length) * length is in bytes, since without knowing whether the string is valid * it's hard to know how many characters there are! */ - const unsigned char *p, *perr, *pend = (const unsigned char *)str + length; - unsigned char c; + const uchar *p, *perr, *pend = (const uchar *)str + length; + uchar c; int ab; - for (p = (const unsigned char *)str; p < pend; p++, length--) { + for (p = (const uchar *)str; p < pend; p++, length--) { c = *p; perr = p; /* Erroneous char is always the first of an invalid utf8 sequence... */ if (ELEM(c, 0xfe, 0xff, 0x00)) { |