summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:58:02 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:58:02 +0000
commit753b3525312a15a2a45a1646100c8bcdfa883b83 (patch)
tree16a7ff176de2cdb3093f8b0c73a03a95fa54f888 /apt-pkg/acquire.cc
parente481d5b040afd0c4efccfd6c660b0c9682483bf0 (diff)
Fixed remove iteration
Author: jgg Date: 2001-05-27 04:28:37 GMT Fixed remove iteration
Diffstat (limited to 'apt-pkg/acquire.cc')
-rw-r--r--apt-pkg/acquire.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc
index ae3ba2e01..74bdaf85b 100644
--- a/apt-pkg/acquire.cc
+++ b/apt-pkg/acquire.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: acquire.cc,v 1.48 2001/05/22 04:17:18 jgg Exp $
+// $Id: acquire.cc,v 1.49 2001/05/27 04:28:37 jgg Exp $
/* ######################################################################
Acquire - File Acquiration
@@ -113,13 +113,15 @@ void pkgAcquire::Remove(Item *Itm)
{
Dequeue(Itm);
- for (ItemIterator I = Items.begin(); I != Items.end(); I++)
+ for (ItemIterator I = Items.begin(); I != Items.end();)
{
if (*I == Itm)
{
Items.erase(I);
I = Items.begin();
}
+ else
+ I++;
}
}
/*}}}*/