summaryrefslogtreecommitdiff
path: root/apt-pkg/aptconfiguration.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-12-14 12:32:53 +0100
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-12-14 12:32:53 +0100
commit4df62de6ea49c29eada5e58764378da1b0ec8648 (patch)
treec0504fa27eee6cea28aee8edb8d33c52fb527249 /apt-pkg/aptconfiguration.cc
parentc8e5d01add32db96106241794de38bd7d7d26990 (diff)
* apt-pkg/aptconfiguration.cc:
- parse dpkg --print-foreign-architectures correctly in case archs are separated by newline instead of space, too.
Diffstat (limited to 'apt-pkg/aptconfiguration.cc')
-rw-r--r--apt-pkg/aptconfiguration.cc2
1 files changed, 1 insertions, 1 deletions
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<std::string> 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);