summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 17:01:46 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 17:01:46 +0000
commitd48c6a7dd41a43a3753b8d15ba0a9deac4526cc5 (patch)
tree134d33b9c78248e5f13fed6008f9cd7401905860 /apt-pkg
parent7b464090c26153e808b90726e2faa58029f6bb88 (diff)
- Clean up some string handling, patch from Peter Lundkvist
Author: mdz Date: 2003-07-18 14:15:11 GMT - Clean up some string handling, patch from Peter Lundkvist <p.lundkvist@telia.com> (Closes: #192225)
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/contrib/strutl.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc
index 4987307be..a75fbdf92 100644
--- a/apt-pkg/contrib/strutl.cc
+++ b/apt-pkg/contrib/strutl.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: strutl.cc,v 1.47 2003/02/02 22:20:27 jgg Exp $
+// $Id: strutl.cc,v 1.48 2003/07/18 14:15:11 mdz Exp $
/* ######################################################################
String Util - Some useful string functions.
@@ -652,7 +652,7 @@ bool ReadMessages(int Fd, vector<string> &List)
continue;
// Pull the message out
- string Message(Buffer,0,I-Buffer);
+ string Message(Buffer,I-Buffer);
// Fix up the buffer
for (; I < End && *I == '\n'; I++);
@@ -1045,7 +1045,7 @@ void URI::CopyFrom(string U)
Path = "/";
// Now we attempt to locate a user:pass@host fragment
- if (FirstColon[1] == '/' && FirstColon[2] == '/')
+ if (FirstColon + 2 <= U.end() && FirstColon[1] == '/' && FirstColon[2] == '/')
FirstColon += 3;
else
FirstColon += 1;