mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Fix UTF-8 characters with an even number of bytes.
This commit is contained in:
@@ -32,12 +32,10 @@ int32_t readUTF8Char(char *dest, char *src)
|
|||||||
|
|
||||||
dest[i] = src[i];
|
dest[i] = src[i];
|
||||||
|
|
||||||
i++;
|
|
||||||
if (state == 0) {
|
if (state == 0) {
|
||||||
dest[i] = '\0';
|
dest[++i] = '\0';
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
dest[i] = src[i];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user