summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>1999-11-19 12:34:14 +1100
committerDamien Miller <djm@mindrot.org>1999-11-19 12:34:14 +1100
commitdc9365bf8b4180fcbab32efd231d86760587be7f (patch)
tree9c673cd356f90fa76b661e6380cf39f0ac632cbb
parent58fc473907bce8d4c8b3f01cdc618f755c3f914d (diff)
Fix progress bar bug
-rw-r--r--ChangeLog1
-rw-r--r--scp.c8
2 files changed, 5 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 5c9024fc..59a4d36f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,7 @@
Integers should not be printed with %s
- EGD uses a socket, not a named pipe. Duh.
- Fix includes in fingerprint.c
+ - Fix scp progress bar bug again.
19991118
- Merged OpenBSD CVS changes
diff --git a/scp.c b/scp.c
index e156f7ba..9cc9528b 100644
--- a/scp.c
+++ b/scp.c
@@ -42,11 +42,11 @@ and ssh has the necessary privileges.)
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: scp.c,v 1.7 1999/11/17 22:28:11 damien Exp $
+ * $Id: scp.c,v 1.8 1999/11/19 01:34:14 damien Exp $
*/
#include "includes.h"
-RCSID("$Id: scp.c,v 1.7 1999/11/17 22:28:11 damien Exp $");
+RCSID("$Id: scp.c,v 1.8 1999/11/19 01:34:14 damien Exp $");
#include "ssh.h"
#include "xmalloc.h"
@@ -976,7 +976,7 @@ run_err(const char *fmt, ...)
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: scp.c,v 1.7 1999/11/17 22:28:11 damien Exp $
+ * $Id: scp.c,v 1.8 1999/11/19 01:34:14 damien Exp $
*/
char *
@@ -1148,7 +1148,7 @@ progressmeter(int flag)
(void)gettimeofday(&now, (struct timezone *)0);
cursize = statbytes;
if (totalbytes != 0) {
- ratio = cursize * 100 / totalbytes;
+ ratio = cursize * 100.0 / totalbytes;
ratio = MAX(ratio, 0);
ratio = MIN(ratio, 100);
}