From 9a1eb0b12413546e1d3a19254498f0198dc67359 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sat, 21 May 2022 00:59:14 +0900 Subject: [PATCH] internal/glfwwin: bug fix: wrong type casts (TlsGetValue) --- internal/glfwwin/api_windows.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/glfwwin/api_windows.go b/internal/glfwwin/api_windows.go index 8973714b4..2d6e45a4b 100644 --- a/internal/glfwwin/api_windows.go +++ b/internal/glfwwin/api_windows.go @@ -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