]> Cypherpunks repositories - gostls13.git/commitdiff
bug in len
authorKen Thompson <ken@golang.org>
Mon, 9 Jun 2008 00:46:28 +0000 (17:46 -0700)
committerKen Thompson <ken@golang.org>
Mon, 9 Jun 2008 00:46:28 +0000 (17:46 -0700)
SVN=121618

src/cmd/6g/cgen.c

index df7dccf534e657e869bd78bdf96075f473c0a332..9e6842daff0ea4dbbcdfd9b09f58e8b4d031c052 100644 (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);