mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 15:18:49 +00:00
Improve fix.
This commit is contained in:
@@ -54,10 +54,7 @@ utf8_to_utf16 :: proc(s: string, allocator := context.temp_allocator) -> []u16 {
|
|||||||
}
|
}
|
||||||
utf8_to_wstring :: proc(s: string, allocator := context.temp_allocator) -> wstring {
|
utf8_to_wstring :: proc(s: string, allocator := context.temp_allocator) -> wstring {
|
||||||
if res := utf8_to_utf16(s, allocator); len(res) > 0 {
|
if res := utf8_to_utf16(s, allocator); len(res) > 0 {
|
||||||
return &res[0]
|
return raw_data(res)
|
||||||
} else {
|
|
||||||
delete(res, allocator)
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user