| Description: |
BWidget version 1.7
progressbar.tcl line ~152 in proc ProgressBar::_modify
Where the "max" is determined from the widget's option
"-maximum". It is possible if the user configured the
-maximum to be 0, that you will get a divide by zero error.
While this shouldn't happen often, it is reasonable to
assume that the user might try to set this value to 0.
The progress bar should either throw an error
immediately when the user configures the widget to have
-maximum that is unacceptable or the progress bar
should handle the value.
adding
if {$max == 0} { set max 1}
just after [Widget::getoption $path -maximum] call
fixes this the divide by 0 error.
|