forked from joejulian/gio
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>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user