]> Cypherpunks repositories - gostls13.git/commitdiff
bug: updated wrong counter when combining values
authorRob Pike <r@golang.org>
Wed, 24 Sep 2008 17:35:59 +0000 (10:35 -0700)
committerRob Pike <r@golang.org>
Wed, 24 Sep 2008 17:35:59 +0000 (10:35 -0700)
R=rsc
OCL=15751
CL=15751

src/cmd/prof/main.c

index cd708e96f7d3b2de0ffc355774298cd9954fa0f4..0712c7b6734d58de3d6f4b8751c7d76fc1d21676 100644 (file)
@@ -252,7 +252,7 @@ dumphistogram()
                        x = pcs[i];
                        func(b2, sizeof(b2), x->pc);
                        if(j > 0 && strcmp(b1, b2) == 0) {
-                               pcs[i-1]->count += x->count;
+                               pcs[j-1]->count += x->count;
                        } else {
                                strcpy(b1, b2);
                                pcs[j++] = x;