]> Cypherpunks repositories - gostls13.git/commitdiff
bug slicing array - cap is huge
authorKen Thompson <ken@golang.org>
Thu, 27 Aug 2009 02:19:07 +0000 (19:19 -0700)
committerKen Thompson <ken@golang.org>
Thu, 27 Aug 2009 02:19:07 +0000 (19:19 -0700)
R=rsc
OCL=33936
CL=33936

src/cmd/gc/walk.c

index ec136df60c057eef46dff4ff16fe54ecc059d72d..8776d34aef6e3b504dd5ffe88d79084b205001cd 100644 (file)
@@ -796,7 +796,7 @@ walkexpr(Node **np, NodeList **init)
                argtype(fn, n->left->type);     // any-1
                argtype(fn, t->type);                   // any-2
                n = mkcall1(fn, t, init,
-                       nod(OADDR, n->left, N), nodintconst(t->bound),
+                       nod(OADDR, n->left, N), nodintconst(n->left->type->bound),
                        conv(n->right->left, types[TINT]),
                        conv(n->right->right, types[TINT]),
                        nodintconst(t->type->width));