]> git.saurik.com Git - apt.git/commitdiff
* apt-pkg/aptconfiguration.cc:
authorMichael Vogt <michael.vogt@ubuntu.com>
Tue, 5 Apr 2011 10:06:10 +0000 (12:06 +0200)
committerMichael Vogt <michael.vogt@ubuntu.com>
Tue, 5 Apr 2011 10:06:10 +0000 (12:06 +0200)
  - fix comparing for a empty string

apt-pkg/aptconfiguration.cc
debian/changelog

index 14ee09e0d2ea7c5c34e6d5b6af02f5465a011edc..ca602d4bfd1df5fa17938e32c0aee7b1eb28332f 100644 (file)
@@ -337,7 +337,7 @@ std::vector<std::string> const Configuration::getArchitectures(bool const &Cache
                                char* arch = strtok(buf, " ");
                                while (arch != NULL) {
                                        for (; isspace(*arch) != 0; ++arch);
-                                       if (arch != '\0') {
+                                       if (arch[0] != '\0') {
                                                char const* archend = arch;
                                                for (; isspace(*archend) == 0 && *archend != '\0'; ++archend);
                                                archs.push_back(string(arch, (archend - arch)));
index 46d677421b612223dfe58debe0abce10610226e6..98efce3afc16a9982741889ee493768b8251c78d 100644 (file)
@@ -7,6 +7,8 @@ apt (0.8.13.3) unstable; urgency=low
   [ Michael Vogt ]
   * mirror method:
     - do not crash if the mirror file fails to download
+  * apt-pkg/aptconfiguration.cc:
+    - fix comparing for a empty string
 
  -- Michael Vogt <michael.vogt@ubuntu.com>  Thu, 10 Mar 2011 15:56:54 +0100