lxn / win

A Windows API wrapper package for the Go Programming Language
Other
1.19k stars 312 forks source link

Fix Go 1.15 checkptr failure; use golang.org/x/sys/windows.UTF16PtrToString #109

Closed bradfitz closed 3 years ago

bradfitz commented 3 years ago

The UTF16PtrToString version in golang.org/x/sys/windows doesn't make slices pointing past the end of an allocation. Use it instead.

This lets programs using lxn/win and built with Go's race detector get a bit further. Other race/checkptr issues with lxn/win and lxn/walk remain for subsequent changes.

Signed-off-by: Brad Fitzpatrick brad@danga.com

lxn commented 3 years ago

Thanks for your PR!

Please add yourself to the AUTHORS file, then I will merge.

bradfitz commented 3 years ago

Done, thanks. I also sorted the AUTHORS per the comment at the top of the file.