diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2010-11-15 10:28:27 +0100 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2010-11-15 10:28:27 +0100 |
commit | 58a642755c63cde3cf377d3719d66add27b13d65 (patch) | |
tree | 92719b94ccca55b5e128f28e9499e1ec331a5440 /apt-pkg/pkgcache.cc | |
parent | fd8bb61d2945d2e2f19f0e0a753129235717a9f3 (diff) | |
parent | 3cf1e4b50a9bb439c4f54a631cfebbb6c4d1ea7d (diff) |
merged from debian
Diffstat (limited to 'apt-pkg/pkgcache.cc')
-rw-r--r-- | apt-pkg/pkgcache.cc | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index 324445fa7..616d400a2 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -891,18 +891,19 @@ pkgCache::DescIterator pkgCache::VerIterator::TranslatedDescription() const for (std::vector<string>::const_iterator l = lang.begin(); l != lang.end(); l++) { - pkgCache::DescIterator DescDefault = DescriptionList(); - pkgCache::DescIterator Desc = DescDefault; - - for (; Desc.end() == false; Desc++) + pkgCache::DescIterator Desc = DescriptionList(); + for (; Desc.end() == false; ++Desc) if (*l == Desc.LanguageCode() || (*l == "en" && strcmp(Desc.LanguageCode(),"") == 0)) break; - if (Desc.end() == true) - Desc = DescDefault; + if (Desc.end() == true) + continue; return Desc; } - + for (pkgCache::DescIterator Desc = DescriptionList(); + Desc.end() == false; ++Desc) + if (strcmp(Desc.LanguageCode(), "") == 0) + return Desc; return DescriptionList(); }; |