summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gvdb-builder.c2
-rw-r--r--gvdb-reader.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/gvdb-builder.c b/gvdb-builder.c
index f65ca7d..91adec6 100644
--- a/gvdb-builder.c
+++ b/gvdb-builder.c
@@ -93,7 +93,7 @@ djb_hash (const gchar *key)
guint32 hash_value = 5381;
while (*key)
- hash_value = hash_value * 33 + *key++;
+ hash_value = hash_value * 33 + *(signed char *)key++;
return hash_value;
}
diff --git a/gvdb-reader.c b/gvdb-reader.c
index 73f4f13..57816af 100644
--- a/gvdb-reader.c
+++ b/gvdb-reader.c
@@ -254,7 +254,7 @@ gvdb_table_lookup (GvdbTable *file,
return NULL;
for (key_length = 0; key[key_length]; key_length++)
- hash_value = (hash_value * 33) + key[key_length];
+ hash_value = (hash_value * 33) + ((signed char *) key)[key_length];
if (!gvdb_table_bloom_filter (file, hash_value))
return NULL;