]> granicus.if.org Git - vnstat/commitdiff
fix vertical bar scaling in text mode hourly output graph, broken due to improper...
authorTeemu Toivola <git@humdi.net>
Tue, 13 Mar 2018 15:30:17 +0000 (17:30 +0200)
committerTeemu Toivola <git@humdi.net>
Tue, 13 Mar 2018 15:30:17 +0000 (17:30 +0200)
src/dbshow.c

index 26783071eac1345f1171db767dcb2dd3aa757ab2..36c827b70c80e3fe75acb9008fb2475ec6b8a563 100644 (file)
@@ -745,11 +745,11 @@ void showhours(const interfaceinfo *interface)
 
                snprintf(matrix[12]+k, 81-k, "%02d ", s);
 
-               dots = 10 * (unsigned int)(hourdata[s].rx / (float)max);
+               dots = (unsigned int)(10 * (hourdata[s].rx / (float)max));
                for (j=0; j<dots; j++)
                        matrix[10-j][k] = cfg.rxhourchar[0];
 
-               dots = 10 * (unsigned int)(hourdata[s].tx / (float)max);
+               dots = (unsigned int)(10 * (hourdata[s].tx / (float)max));
                for (j=0; j<dots; j++)
                        matrix[10-j][k+1] = cfg.txhourchar[0];