mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-04 03:35:19 +02:00
Restore nul check in u8_nextchar
This commit is contained in:
@@ -214,7 +214,7 @@ uint32_t u8_nextchar(const char *s, int *index, size_t size) {
|
||||
do {
|
||||
ch = (ch << 6) + (unsigned char)s[i++];
|
||||
sz++;
|
||||
} while (i < size && ((s[i]) & 0xC0) == 0x80);
|
||||
} while (i < size && s[i] && ((s[i]) & 0xC0) == 0x80);
|
||||
*index = i;
|
||||
return ch - offsetsFromUTF8[sz - 1];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user