]> Cypherpunks repositories - gostls13.git/commitdiff
slicecopy was always using 16 (sizeof slice) for the size instead of size of element.
authorRob Pike <r@golang.org>
Wed, 18 Nov 2009 21:43:48 +0000 (13:43 -0800)
committerRob Pike <r@golang.org>
Wed, 18 Nov 2009 21:43:48 +0000 (13:43 -0800)
R=rsc
CC=ken2, golang-dev
https://golang.org/cl/156083

src/cmd/gc/walk.c

index bb100b9716a2b1b9678c6823a999df3ef4810e94..9f3c81e194f15a356cd83bba172c20cc1396428e 100644 (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: