[Aptitude-svn-commit] r3692 - in branches/aptitude-0.3/aptitude: . src/generic

Daniel Burrows dburrows at costa.debian.org
Tue Jul 26 04:22:32 UTC 2005


Author: dburrows
Date: Tue Jul 26 04:22:30 2005
New Revision: 3692

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/src/generic/tags.cc
Log:
Fix the tag list parser to not skip the first tag in each list of tags.

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Tue Jul 26 04:22:30 2005
@@ -1,5 +1,10 @@
 2005-07-25  Daniel Burrows  <dburrows at debian.org>
 
+	* src/generic/tags.cc:
+
+	  Fix the tag list parser so it doesn't routinely skip the first
+	  tag out of a list of tags.  All tests pass now!
+
 	* src/generic/tests/test_tags.cc:
 
 	  Fix a reversed-sense test (we want to test a<b and b>a,

Modified: branches/aptitude-0.3/aptitude/src/generic/tags.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/generic/tags.cc	(original)
+++ branches/aptitude-0.3/aptitude/src/generic/tags.cc	Tue Jul 26 04:22:30 2005
@@ -131,8 +131,11 @@
 
 tag_list::const_iterator tag_list::begin() const
 {
-  const_iterator rval(start, start, finish);
-  ++rval;
+  const char *endfirst=start;
+  while(endfirst != finish && (*endfirst) != ',')
+    ++endfirst;
+
+  const_iterator rval(start, endfirst, finish);
   return rval;
 }
 



More information about the Aptitude-svn-commit mailing list