From 760225df754099fd3d0df02c7ce3de3eda4b9775 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Fri, 4 Sep 2020 01:18:37 +0900 Subject: [PATCH] glfw: Replace the pointer size calc with bits.UintSize / 8 Updates #1306 --- internal/glfw/glfw_windows.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/glfw/glfw_windows.go b/internal/glfw/glfw_windows.go index f1b83bede..c13595cf7 100644 --- a/internal/glfw/glfw_windows.go +++ b/internal/glfw/glfw_windows.go @@ -17,6 +17,7 @@ package glfw import ( "image" "image/draw" + "math/bits" "runtime" "sync" "unsafe" @@ -384,7 +385,7 @@ func GetMonitors() []*Monitor { if m != nil { ms[i] = &Monitor{uintptr(m)} } - ptr += unsafe.Sizeof(unsafe.Pointer(uintptr(0))) + ptr += bits.UintSize / 8 } return ms }