diff --git a/compiler.go b/compiler.go index 21aa538..c066589 100644 --- a/compiler.go +++ b/compiler.go @@ -1097,7 +1097,5 @@ func unsafeGetBytes(s string) []byte { if s == "" { return []byte{} } - return (*[0x7fff0000]byte)(unsafe.Pointer( - (*reflect.StringHeader)(unsafe.Pointer(&s)).Data), - )[:len(s):len(s)] + return unsafe.Slice(unsafe.StringData(s), len(s)) }