summaryrefslogtreecommitdiff
path: root/cmdline/acqprogress.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:55:11 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:55:11 +0000
commit8b067c22e27a5939e45517091fbb8322ad7b71c8 (patch)
tree63c83f6279b4254d04cdf4566e222843dac443de /cmdline/acqprogress.cc
parent95baf595094a2c12fa5bf88d1240e36413e6946e (diff)
3 more bugs
Author: jgg Date: 1999-11-16 03:16:34 GMT 3 more bugs
Diffstat (limited to 'cmdline/acqprogress.cc')
-rw-r--r--cmdline/acqprogress.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/cmdline/acqprogress.cc b/cmdline/acqprogress.cc
index 2f7a9c4fc..0eb8d4b6f 100644
--- a/cmdline/acqprogress.cc
+++ b/cmdline/acqprogress.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: acqprogress.cc,v 1.18 1999/10/18 03:18:40 jgg Exp $
+// $Id: acqprogress.cc,v 1.19 1999/11/16 03:16:34 jgg Exp $
/* ######################################################################
Acquire Progress - Command line progress meter
@@ -145,10 +145,12 @@ bool AcqTextStatus::Pulse(pkgAcquire *Owner)
enum {Long = 0,Medium,Short} Mode = Long;
- char Buffer[300];
+ char Buffer[1024];
char *End = Buffer + sizeof(Buffer);
char *S = Buffer;
-
+ if (ScreenWidth >= sizeof(Buffer))
+ ScreenWidth = sizeof(Buffer)-1;
+
// Put in the percent done
sprintf(S,"%ld%%",long(double((CurrentBytes + CurrentItems)*100.0)/double(TotalBytes+TotalItems)));