Properly convert to utf16.
This commit is contained in:
parent
1189cc0fbd
commit
df96656ff5
1 changed files with 1 additions and 1 deletions
|
@ -68,7 +68,7 @@ u16* image_to_tiles(const char* image, u32 width, u32 height, PixelFormat format
|
||||||
void utf8_to_utf16(u16* dst, const char* src, size_t max_len) {
|
void utf8_to_utf16(u16* dst, const char* src, size_t max_len) {
|
||||||
size_t n = 0;
|
size_t n = 0;
|
||||||
while(src[n]) {
|
while(src[n]) {
|
||||||
dst[n] = (u16) src[n] << 8;
|
dst[n] = (u16) src[n];
|
||||||
if(n++ >= max_len) {
|
if(n++ >= max_len) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue