mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-06 06:38:20 +00:00
Fix read_reg_string which was using the wrong size in bytes for the resulting buffer
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user