From ee047e00039e954d6569bd9d18052d96d7de89aa Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Wed, 10 Sep 2014 12:29:02 +0000 Subject: [PATCH] fixed another glitch in the histogram plot git-svn-id: https://zerberus.eonerc.rwth-aachen.de:8443/svn/s2ss/trunk@239 8ec27952-4edc-4aab-86aa-e87bb2611832 --- server/src/utils.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/src/utils.c b/server/src/utils.c index 1526b91c7..476506746 100644 --- a/server/src/utils.c +++ b/server/src/utils.c @@ -139,10 +139,10 @@ void hist_plot(unsigned *hist, int length) memset(buf, '#', sizeof(buf)); for (int i = 0; i < length; i++) { bar = HIST_HEIGHT * (float) hist[i] / hist[max]; - if (hist[i] == hist[max]) - info("%2u | " RED("%5u") " | " BLD("%.*s"), i, hist[i], bar, buf); - else if (hist[i] == 0) + if (hist[i] == 0) info("%2u | " GRN("%5u") " | " , i, hist[i]); + else if (hist[i] == hist[max]) + info("%2u | " RED("%5u") " | " BLD("%.*s"), i, hist[i], bar, buf); else info("%2u | " "%5u" " | " "%.*s", i, hist[i], bar, buf); }