From: Ken Thompson Date: Wed, 18 Nov 2009 04:44:35 +0000 (-0800) Subject: bug in copy X-Git-Tag: weekly.2009-12-07~237 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=948f3e77e1f378952c954ebb753de9bc6376a31b;p=gostls13.git bug in copy R=rsc https://golang.org/cl/156056 --- diff --git a/src/pkg/runtime/slice.c b/src/pkg/runtime/slice.c index 00d9724fbe..02839e27cc 100644 --- a/src/pkg/runtime/slice.c +++ b/src/pkg/runtime/slice.c @@ -189,7 +189,7 @@ runtime·slicecopy(Slice to, Slice fm, uintptr width, int32 ret) } ret = fm.len; - if(to.len > ret) + if(to.len < ret) ret = to.len; memmove(to.array, fm.array, ret*width);