From 7cf62f00c34b98cc2f8acab75d5259ff4fc2c6f6 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Thu, 16 May 2024 16:30:45 +0100 Subject: [PATCH] Correct #soa RTTI usage --- base/runtime/core_builtin_soa.odin | 16 ++++++++-------- core/fmt/fmt.odin | 2 +- core/strings/strings.odin | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/base/runtime/core_builtin_soa.odin b/base/runtime/core_builtin_soa.odin index 23f879791..547df0a2b 100644 --- a/base/runtime/core_builtin_soa.odin +++ b/base/runtime/core_builtin_soa.odin @@ -102,7 +102,7 @@ make_soa_aligned :: proc($T: typeid/#soa[]$E, length: int, alignment: int, alloc total_size := 0 for i in 0.. (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 }