aboutsummaryrefslogtreecommitdiff
path: root/core/strings
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2024-05-16 16:30:45 +0100
committergingerBill <bill@gingerbill.org>2024-05-16 16:30:45 +0100
commit7cf62f00c34b98cc2f8acab75d5259ff4fc2c6f6 (patch)
treee0c6fc1a6bb5d8161184fd988d714a12e700c121 /core/strings
parentc9b1c99a4057b7e3f6caee3fb37cf85ca29a7fc9 (diff)
Correct #soa RTTI usage
Diffstat (limited to 'core/strings')
-rw-r--r--core/strings/strings.odin4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/strings/strings.odin b/core/strings/strings.odin
index 13c53f48e..101ba72a9 100644
--- a/core/strings/strings.odin
+++ b/core/strings/strings.odin
@@ -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
}