mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-04-27 08:43:40 -07:00
(progress-reporter-do-update): When `min-value' is equal
to `max-value', set `percentage' to 0 and prevent division by zero.
This commit is contained in:
parent
340b8d4f63
commit
fe6b1dbdc6
2 changed files with 8 additions and 1 deletions
|
|
@ -1,3 +1,8 @@
|
|||
2005-03-20 Juri Linkov <juri@jurta.org>
|
||||
|
||||
* subr.el (progress-reporter-do-update): When `min-value' is equal
|
||||
to `max-value', set `percentage' to 0 and prevent division by zero.
|
||||
|
||||
2005-03-20 Michael Albinus <michael.albinus@gmx.de>
|
||||
|
||||
Sync with Tramp 2.0.48.
|
||||
|
|
|
|||
|
|
@ -2750,7 +2750,9 @@ change the displayed message."
|
|||
(min-value (aref parameters 1))
|
||||
(max-value (aref parameters 2))
|
||||
(one-percent (/ (- max-value min-value) 100.0))
|
||||
(percentage (truncate (/ (- value min-value) one-percent)))
|
||||
(percentage (if (= max-value min-value)
|
||||
0
|
||||
(truncate (/ (- value min-value) one-percent))))
|
||||
(update-time (aref parameters 0))
|
||||
(current-time (float-time))
|
||||
(enough-time-passed
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue