X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Ftally%2Ftally.c;h=29f055588015f5e38f02513c6dcce39b4657ff20;hb=d98e77e56cc401eeb75744d6fa40a92a1e6e1f94;hp=774373ca0f88e0b4a48bed5029107cf28bded0d1;hpb=0eb0295702246b0b1b273f019a3b7a3d0600dd22;p=ccan diff --git a/ccan/tally/tally.c b/ccan/tally/tally.c index 774373ca..29f05558 100644 --- a/ccan/tally/tally.c +++ b/ccan/tally/tally.c @@ -506,11 +506,11 @@ char *tally_histogram(const struct tally *tally, if (count > covered) { count -= covered; + memset(p, '*', count); } else { count = 0; } - memset(p, '*', count); p += count; *p = '\n'; p++;