From: Date: Sun, 4 Jan 2009 22:16:43 +0000 (-0800) Subject: Fix for decrement X-Git-Tag: 0.26~32 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=a4edd02b7b976d5f5e011e9720ecf95352f3ca8a;p=m6w6%2Flibmemcached Fix for decrement --- 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);