~eliasnaur/gio

57872856e8c5b5de1381c601e6580877b0f37f44 — Elias Naur 3 years ago b11fd6e
internal/unsafe: fix SliceOf to return len equals to cap

Broken by gioui.org/commit/2dce8a0155ae192f54f74747d660b9f311e9e364,
found while debugging the dormant OpenGL backend for Windows.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
1 files changed, 1 insertions(+), 0 deletions(-)

M internal/unsafe/unsafe.go
M internal/unsafe/unsafe.go => internal/unsafe/unsafe.go +1 -0
@@ 41,6 41,7 @@ func SliceOf(s uintptr) []byte {
	h := (*reflect.SliceHeader)(unsafe.Pointer(&res))
	h.Data = s
	h.Cap = 1 << 30
	h.Len = 1 << 30
	return res
}