summaryrefslogtreecommitdiff
path: root/apt-pkg/deb/deblistparser.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:53:32 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:53:32 +0000
commit02f000a9c4dfeac88e14190c3a88dc1214abaa52 (patch)
tree0391142001f2982cc7ddc1570ec94d5dc1742119 /apt-pkg/deb/deblistparser.cc
parentf760b7d2124f9b4498b62c481f08e56cc617e675 (diff)
Fixed space parsing problem
Author: jgg Date: 1999-04-12 19:16:11 GMT Fixed space parsing problem
Diffstat (limited to 'apt-pkg/deb/deblistparser.cc')
-rw-r--r--apt-pkg/deb/deblistparser.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc
index 157a465f4..9adc60044 100644
--- a/apt-pkg/deb/deblistparser.cc
+++ b/apt-pkg/deb/deblistparser.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: deblistparser.cc,v 1.17 1999/02/21 08:38:53 jgg Exp $
+// $Id: deblistparser.cc,v 1.18 1999/04/12 19:16:11 jgg Exp $
/* ######################################################################
Package Cache Generator - Generator for the cache structure.
@@ -318,7 +318,11 @@ const char *debListParser::ParseDepends(const char *Start,const char *Stop,
if (I == Stop || Start == I)
return 0;
- Ver = string(Start,I-Start);
+ // Skip trailing whitespace
+ const char *End = I;
+ for (; End > Start && isspace(End[-1]); End--);
+
+ Ver = string(Start,End-Start);
I++;
}
else