Fix warning.
This commit is contained in:
parent
3770f9924a
commit
c73af92d4e
1 changed files with 4 additions and 2 deletions
|
@ -285,8 +285,10 @@ func pickFolders(opts options, multi bool) (str string, lst []string, err error)
|
|||
}
|
||||
defer coTaskMemFree.Call(ptr)
|
||||
|
||||
res := reflect.SliceHeader{Data: ptr, Len: 32768, Cap: 32768}
|
||||
str = syscall.UTF16ToString(*(*[]uint16)(unsafe.Pointer(&res)))
|
||||
var res []uint16
|
||||
hdr := (*reflect.SliceHeader)(unsafe.Pointer(&res))
|
||||
hdr.Data, hdr.Len, hdr.Cap = ptr, 32768, 32768
|
||||
str = syscall.UTF16ToString(res)
|
||||
lst = append(lst, str)
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue