From 4df62de6ea49c29eada5e58764378da1b0ec8648 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 14 Dec 2011 12:32:53 +0100 Subject: * apt-pkg/aptconfiguration.cc: - parse dpkg --print-foreign-architectures correctly in case archs are separated by newline instead of space, too. --- apt-pkg/aptconfiguration.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg') diff --git a/apt-pkg/aptconfiguration.cc b/apt-pkg/aptconfiguration.cc index bc385b2dc..cc77eea6f 100644 --- a/apt-pkg/aptconfiguration.cc +++ b/apt-pkg/aptconfiguration.cc @@ -335,7 +335,7 @@ std::vector const Configuration::getArchitectures(bool const &Cache FILE *dpkg = popen(dpkgcall.c_str(), "r"); char buf[1024]; if(dpkg != NULL) { - if (fgets(buf, sizeof(buf), dpkg) != NULL) { + while (fgets(buf, sizeof(buf), dpkg) != NULL) { char* arch = strtok(buf, " "); while (arch != NULL) { for (; isspace(*arch) != 0; ++arch); -- cgit v1.2.3-70-g09d2