1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

builder: fix msvc.v

This commit is contained in:
Alexander Medvednikov 2020-04-26 09:33:40 +02:00
parent 20bcb6b8bb
commit d844ff1381

View File

@ -43,10 +43,12 @@ fn find_windows_kit_internal(key RegKey, versions []string) ?string {
continue continue
} }
alloc_length := (required_bytes + 2) alloc_length := (required_bytes + 2)
mut value := &&u16(malloc(alloc_length)) mut value := &u16(malloc(alloc_length))
if isnil(value) { if isnil(value) {
continue continue
} }
//
else{}
result2 := C.RegQueryValueEx(key, version.to_wide(), 0, 0, value, &alloc_length) result2 := C.RegQueryValueEx(key, version.to_wide(), 0, 0, value, &alloc_length)
if result2 != 0 { if result2 != 0 {
continue continue