Commit 612189aa authored by Joanne Hugé's avatar Joanne Hugé

Fix print histograms function

parent 27086011
......@@ -278,10 +278,12 @@ static void print_histograms() {
}
max_hist_val = 0;
for (int j = 0; j < MAX_HIST_VAL && histograms[2][j]; j++)
for (int j = 0; j < MAX_HIST_VAL; j++)
if(histograms[2][j])
max_hist_val = j;
min_hist_val = MAX_HIST_VAL - 1;
for (int j = MAX_HIST_VAL - 1; j >= 0 && histograms[2][j]; j--)
for (int j = MAX_HIST_VAL - 1; j >= 0; j--)
if(histograms[2][j])
min_hist_val = j;
printf( "]}, {"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment