mirror of
https://github.com/golang/go
synced 2024-11-12 08:40:21 -07:00
update utf8_test.go
R=rsc OCL=22170 CL=22170
This commit is contained in:
parent
dabdfa6cce
commit
344b16512c
@ -45,7 +45,7 @@ var utf8map = []Utf8Map {
|
||||
}
|
||||
|
||||
func Bytes(s string) []byte {
|
||||
b := new([]byte, len(s)+1);
|
||||
b := make([]byte, len(s)+1);
|
||||
if !syscall.StringToBytes(b, s) {
|
||||
panic("StringToBytes failed");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user