internal/glfwwin: bug fix: wrong type casts (TlsGetValue)

This commit is contained in:
Hajime Hoshi 2022-05-21 00:59:14 +09:00
parent 93731673ad
commit 9a1eb0b124

View File

@ -1772,7 +1772,7 @@ func _TlsFree(dwTlsIndex uint32) error {
func _TlsGetValue(dwTlsIndex uint32) (uintptr, error) {
r, _, e := procTlsGetValue.Call(uintptr(dwTlsIndex))
if int32(r) == 0 && !errors.Is(e, windows.ERROR_SUCCESS) {
if r == 0 && !errors.Is(e, windows.ERROR_SUCCESS) {
return 0, fmt.Errorf("glfwwin: TlsGetValue failed: %w", e)
}
return r, nil