From 27e1a3701e39063f274a602cf65161d854ba59da Mon Sep 17 00:00:00 2001 From: ueno Date: Fri, 15 Sep 2006 03:36:36 +0000 Subject: [PATCH] Avoid div-by-zero error. --- epg.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/epg.el b/epg.el index 82ce61e..6ba12fe 100644 --- a/epg.el +++ b/epg.el @@ -1305,7 +1305,8 @@ This function is for internal use only." (defun epg-progress-callback-function (context what char current total handback) - (message "%s: %d%% (%d/%d)" what (/ current 1.0 total) current total)) + (message "%s: %d%% (%d/%d)" what (if (> total 0) (/ current 1.0 total) 0) + current total)) (defun epg--list-keys-1 (context name mode) (let ((args (append (if epg-gpg-home-directory -- 1.7.10.4