bug in len

SVN=121618
This commit is contained in:
Ken Thompson 2008-06-08 17:46:28 -07:00
parent 316bc2637d
commit b6eca3534c

View file

@ -144,7 +144,7 @@ cgen(Node *n, Node *res)
case OLEN:
if(isptrto(nl->type, TSTRING)) {
regalloc(&n1, types[tptr], res);
cgen(nl, res);
cgen(nl, &n1);
n1.op = OINDREG;
n1.type = types[TINT32];
gmove(&n1, res);