]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/opascal.el
Don't overflow if computing approximate percentage
[gnu-emacs] / lisp / progmodes / opascal.el
index 2eba620ceb2435a1e5ffb1cd38fd51f181ce3177..ef3433f003bbac39c0bbedd66c6a2f29fba08a4e 100644 (file)
@@ -368,7 +368,7 @@ routine.")
          ;; Report the percentage complete.
          (setq opascal-progress-last-reported-point p)
          (message "%s %s ... %d%%"
-                  desc (buffer-name) (/ (* 100 p) (point-max))))))
+                  desc (buffer-name) (floor (* 100.0 p) (point-max))))))
 
 (defun opascal-next-line-start (&optional from-point)
   ;; Returns the first point of the next line.