1
0
mirror of https://github.com/golang/go synced 2024-09-25 09:20:18 -06:00

slicecopy was always using 16 (sizeof slice) for the size instead of size of element.

R=rsc
CC=ken2, golang-dev
https://golang.org/cl/156083
This commit is contained in:
Rob Pike 2009-11-18 13:43:48 -08:00
parent ef8f483c60
commit 7518613430

View File

@ -911,7 +911,7 @@ walkexpr(Node **np, NodeList **init)
argtype(fn, n->right->type);
n = mkcall1(fn, n->type, init,
n->left, n->right,
nodintconst(n->left->type->width));
nodintconst(n->left->type->type->width));
goto ret;
case OCLOSE: