summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcache.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2009-04-24 19:53:19 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2009-04-24 19:53:19 +0200
commit76dbdfc7f02096758f63bcb6d306b54d5a2d0d02 (patch)
tree0c9bc6a3e480e952a8817fc8165e8d81fadc5e45 /apt-pkg/pkgcache.cc
parent3a41eec0084219731dc48d5cf7ecd803ea6d5483 (diff)
* fix problematic use of tolower() when calculating the version
hash by using locale independant tolower_ascii() function. Thanks to M. Vefa Bicakci (LP: #80248) * build fixes for g++-4.4 * include dmesg output in apport package failures
Diffstat (limited to 'apt-pkg/pkgcache.cc')
-rw-r--r--apt-pkg/pkgcache.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc
index 4fbf42c4b..6687864ee 100644
--- a/apt-pkg/pkgcache.cc
+++ b/apt-pkg/pkgcache.cc
@@ -163,7 +163,7 @@ unsigned long pkgCache::sHash(const string &Str) const
{
unsigned long Hash = 0;
for (string::const_iterator I = Str.begin(); I != Str.end(); I++)
- Hash = 5*Hash + tolower(*I);
+ Hash = 5*Hash + tolower_ascii(*I);
return Hash % _count(HeaderP->HashTable);
}
@@ -171,7 +171,7 @@ unsigned long pkgCache::sHash(const char *Str) const
{
unsigned long Hash = 0;
for (const char *I = Str; *I != 0; I++)
- Hash = 5*Hash + tolower(*I);
+ Hash = 5*Hash + tolower_ascii(*I);
return Hash % _count(HeaderP->HashTable);
}