1
0
mirror of https://github.com/golang/go synced 2024-10-04 03:21:22 -06:00

bug slicing array - cap is huge

R=rsc
OCL=33936
CL=33936
This commit is contained in:
Ken Thompson 2009-08-26 19:19:07 -07:00
parent 3cf330f089
commit 2d73b7f7f0

View File

@ -796,7 +796,7 @@ walkexpr(Node **np, NodeList **init)
argtype(fn, n->left->type); // any-1 argtype(fn, n->left->type); // any-1
argtype(fn, t->type); // any-2 argtype(fn, t->type); // any-2
n = mkcall1(fn, t, init, 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->left, types[TINT]),
conv(n->right->right, types[TINT]), conv(n->right->right, types[TINT]),
nodintconst(t->type->width)); nodintconst(t->type->width));