From 70c4f4bc457a1fee216fbe7743ea96ae88b787fd Mon Sep 17 00:00:00 2001 From: gingerBill Date: Thu, 2 Apr 2026 10:25:19 +0100 Subject: [PATCH] Fix `read_reg_string` which was using the wrong size in bytes for the resulting buffer --- core/sys/info/platform_windows.odin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/sys/info/platform_windows.odin b/core/sys/info/platform_windows.odin index e7d3baa83..585269774 100644 --- a/core/sys/info/platform_windows.odin +++ b/core/sys/info/platform_windows.odin @@ -366,7 +366,7 @@ read_reg_string :: proc "contextless" (hkey: sys.HKEY, subkey, val: cstring16, r return } - utf16.decode_to_utf8(res_buf[:result_size], buf_utf16[:]) + utf16.decode_to_utf8(res_buf[:], buf_utf16[:result_size / size_of(u16)]) res = string(cstring(&res_buf[0])) return res, true }