Properly convert to utf16.

This commit is contained in:
Steven Smith 2015-01-25 14:54:42 -08:00
parent 1189cc0fbd
commit df96656ff5

View file

@ -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;
} }