mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-21 05:45:19 +00:00
Correct #soa RTTI usage
This commit is contained in:
@@ -91,8 +91,8 @@ Inputs:
|
||||
Returns:
|
||||
- res: A string created from the null-terminated byte pointer and length
|
||||
*/
|
||||
string_from_null_terminated_ptr :: proc(ptr: ^byte, len: int) -> (res: string) {
|
||||
s := transmute(string)mem.Raw_String{ptr, len}
|
||||
string_from_null_terminated_ptr :: proc(ptr: [^]byte, len: int) -> (res: string) {
|
||||
s := string(ptr[:len])
|
||||
s = truncate_to_byte(s, 0)
|
||||
return s
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user