]> Cypherpunks repositories - gostls13.git/commit
If ByteBuffer has never been used, b.buf is nil but Data() should still work.
authorRob Pike <r@golang.org>
Tue, 16 Dec 2008 21:01:39 +0000 (13:01 -0800)
committerRob Pike <r@golang.org>
Tue, 16 Dec 2008 21:01:39 +0000 (13:01 -0800)
commita10267adcdd40093cb2c9d8a470194332b947b86
tree6c3ea39f93c67c0a292b294c728066771b55cd64
parent30a1a8c92251941dd850d66ec434231cc1140fb3
If ByteBuffer has never been used, b.buf is nil but Data() should still work.
Fix the bug using a (safe) shared global empty array.

R=rsc
DELTA=8  (8 added, 0 deleted, 0 changed)
OCL=21303
CL=21303
src/lib/io/bytebuffer.go