mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Fix in utf8to16 conversion.
This commit is contained in:
@@ -306,7 +306,7 @@ fn String utf32to8(Char32[] utf32, Allocator* allocator = mem::current_allocator
|
||||
return data[:len];
|
||||
}
|
||||
|
||||
fn Char16[]! utf8to16(String utf8, Allocator* allocator = mem::current_allocator)
|
||||
fn Char16[]! utf8to16(String utf8, Allocator* allocator = mem::current_allocator())
|
||||
{
|
||||
usz len16 = conv::utf16len_for_utf8(utf8);
|
||||
Char16* data = allocator.alloc((len16 + 1) * Char16.sizeof)?;
|
||||
|
||||
Reference in New Issue
Block a user