Clarify that we're trying to block div-by-0 by checking the totalsize.

The elementSize can be 0, that's fine. It's when ALL the elements are 0....
This commit is contained in:
Ray Greenwell
2012-03-16 14:08:10 +00:00
parent eb2fee6b7c
commit dba65488f3
@@ -48,7 +48,7 @@ public class MetaProgressObserver implements ProgressObserver
// documentation inherited from interface // documentation inherited from interface
public void progress (int percent) public void progress (int percent)
{ {
if (_elementSize > 0) { if (_totalSize > 0) {
_target.progress((int)((_accum + (percent * _elementSize)) / _totalSize)); _target.progress((int)((_accum + (percent * _elementSize)) / _totalSize));
} }
} }