]> Cypherpunks repositories - gostls13.git/commit
change string([]byte) to pass array, rather than &a[0],
authorRuss Cox <rsc@golang.org>
Tue, 23 Sep 2008 03:12:15 +0000 (20:12 -0700)
committerRuss Cox <rsc@golang.org>
Tue, 23 Sep 2008 03:12:15 +0000 (20:12 -0700)
commit5383e28ea0d98e76bb625949dc38b90cee2f2b5b
tree5d561790898a6c054c44143964008578cef54a3b
parentc13c03c261ddd2c21a47b7b36754573b4e1f7c44
change string([]byte) to pass array, rather than &a[0],
to string convert.  if the byte array has length 0,
the computation of &a[0] throws an index bounds error.

for fixed size arrays, this ends up invoking arrays2d
unnecessarily, but it works.

R=ken
DELTA=304  (44 added, 28 deleted, 232 changed)
OCL=15674
CL=15678
src/cmd/gc/sys.go
src/cmd/gc/sysimport.c
src/cmd/gc/walk.c
src/runtime/string.c
test/bugs/bug102.go