# HG changeset patch # User rotor # Date 1190855191 0 # Node ID 2a0ec41643a8a7e4d10dd9905dca9f13be4ad727 # Parent 885ec11c4915f1f1f078c50566481bbbbbb577a0 * bugfix to histogram stats with a zero volume, discovered by Simon, fixed by Claude diff --git a/progs/mincstats/mincstats.c b/progs/mincstats/mincstats.c --- a/progs/mincstats/mincstats.c +++ b/progs/mincstats/mincstats.c @@ -5,7 +5,11 @@ * University of Queensland, Australia * * $Log: mincstats.c,v $ - * Revision 1.22 2005-07-29 16:46:21 bert + * Revision 1.23 2007-09-27 01:06:31 rotor + * * bugfix to histogram stats with a zero volume, discovered by Simon, fixed by + * Claude + * + * Revision 1.22 2005/07/29 16:46:21 bert * Add warning message for mincstats -mask w/o -mask_range, -mask_binvalue, etc. * * Revision 1.21 2005/07/25 19:56:52 bert @@ -1369,7 +1373,8 @@ } } - if(Hist && (value >= hist_range[0]) && (value <= hist_range[1])) { + if(Hist && (value >= hist_range[0]) && (value <= hist_range[1]) && + (hist_sep > 0.0) ) { /*lower limit <= value < upper limit */ hist_index = (int)floor((value - hist_range[0]) / hist_sep); if(hist_index >= hist_bins) {