summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tdecore/libintl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tdecore/libintl.cpp b/tdecore/libintl.cpp
index 5d2f6a086..c7b8c7ee6 100644
--- a/tdecore/libintl.cpp
+++ b/tdecore/libintl.cpp
@@ -260,8 +260,8 @@ hash_string (const char *str_param)
while (*str != '\0')
{
hval <<= 4;
- hval += (unsigned long) *str++;
- g = hval & ((unsigned long) 0xf << (HASHWORDBITS - 4));
+ hval += (unsigned char) *str++;
+ g = hval & ((unsigned long int) 0xf << (HASHWORDBITS - 4));
if (g != 0)
{
hval ^= g >> (HASHWORDBITS - 8);