Browse Source

* apt-pkg/aptconfiguration.cc:
- fix comparing for a empty string

Michael Vogt 15 years ago
parent
commit
bdb3d92cd2
2 changed files with 3 additions and 1 deletions
  1. 1 1
      apt-pkg/aptconfiguration.cc
  2. 2 0
      debian/changelog

+ 1 - 1
apt-pkg/aptconfiguration.cc

@@ -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)));

+ 2 - 0
debian/changelog

@@ -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