From a4edd02b7b976d5f5e011e9720ecf95352f3ca8a Mon Sep 17 00:00:00 2001 From: Date: Sun, 4 Jan 2009 14:16:43 -0800 Subject: [PATCH] Fix for decrement --- ChangeLog | 3 +++ libmemcached/memcached_hash.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 1f58b4fb..c61a7a2c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +0.26 + * Fix for decrement on hash key + 0.25 Fri Nov 28 09:59:35 PST 2008 * Jenkins HASH added. * Update of Murmur hash code diff --git a/libmemcached/memcached_hash.c b/libmemcached/memcached_hash.c index 29c8d048..de0ce1dc 100644 --- a/libmemcached/memcached_hash.c +++ b/libmemcached/memcached_hash.c @@ -186,7 +186,7 @@ static uint32_t internal_generate_hash(const char *key, size_t key_length) const char *ptr= key; uint32_t value= 0; - while (--key_length) + while (key_length--) { value += *ptr++; value += (value << 10); -- 2.30.2