From: Ken Thompson Date: Thu, 27 Aug 2009 02:19:07 +0000 (-0700) Subject: bug slicing array - cap is huge X-Git-Tag: weekly.2009-11-06~755 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=2d73b7f7f06cdae4950c380d0793e8dcca5ee991;p=gostls13.git bug slicing array - cap is huge R=rsc OCL=33936 CL=33936 --- diff --git a/src/cmd/gc/walk.c b/src/cmd/gc/walk.c index ec136df60c..8776d34aef 100644 --- a/src/cmd/gc/walk.c +++ b/src/cmd/gc/walk.c @@ -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));