]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/pkgcache.cc
apt-cache: stats: Show a table utilization as percentage
[apt.git] / apt-pkg / pkgcache.cc
index 347a0954e1b2c71ea03d3ca8ee5cf5bda41151e6..4d8b9bc4172a7fec1ace37a03754176ffbc217df 100644 (file)
@@ -210,7 +210,7 @@ map_id_t pkgCache::sHash(const string &Str) const
 {
    uint32_t Hash = 5381;
    for (string::const_iterator I = Str.begin(); I != Str.end(); ++I)
-      Hash = 33 * Hash + tolower_ascii(*I);
+      Hash = 33 * Hash + tolower_ascii((signed char)*I);
    return Hash % HeaderP->GetHashTableSize();
 }
 
@@ -218,7 +218,7 @@ map_id_t pkgCache::sHash(const char *Str) const
 {
    uint32_t Hash = 5381;
    for (const char *I = Str; *I != 0; ++I)
-      Hash = 33 * Hash + tolower_ascii(*I);
+      Hash = 33 * Hash + tolower_ascii((signed char)*I);
    return Hash % HeaderP->GetHashTableSize();
 }