summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcache.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2010-10-28 21:19:57 +0200
committerMichael Vogt <mvo@debian.org>2010-10-28 21:19:57 +0200
commitf71b3b984f02daf49cba1141373da19d233d3fae (patch)
tree5c0733cbc93dfea370b65bbb65ba97f594833dc4 /apt-pkg/pkgcache.cc
parentc1fa50e1502b2f3ab2ec44cad00c3af3f910615a (diff)
parent4b625b95a04a9d73c6682a3f9354112a394bb674 (diff)
merged from donkult
Diffstat (limited to 'apt-pkg/pkgcache.cc')
-rw-r--r--apt-pkg/pkgcache.cc15
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();
};