mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-04 06:38:47 +00:00
Fix copy
This commit is contained in:
@@ -15,6 +15,7 @@ new_c_string :: proc(s: string) -> ^u8 {
|
||||
}
|
||||
|
||||
to_odin_string :: proc(c: ^u8) -> string {
|
||||
if c == nil do return "";
|
||||
len := 0;
|
||||
for (c+len)^ != 0 do len+=1;
|
||||
return string(mem.slice_ptr(c, len));
|
||||
|
||||
Reference in New Issue
Block a user