From: Sascha Schumann Date: Fri, 3 Nov 2000 11:59:41 +0000 (+0000) Subject: Fix implementation of hash algorithm X-Git-Tag: php-4.0.4RC3~340 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b4ce4e26340e9ef7effb3a3b1f7610d01827d185;p=php Fix implementation of hash algorithm --- diff --git a/ext/session/mod_mm.c b/ext/session/mod_mm.c index 7255165e32..c3e4d5ad06 100644 --- a/ext/session/mod_mm.c +++ b/ext/session/mod_mm.c @@ -77,7 +77,7 @@ static unsigned int ps_sd_hash(const char *data) for (val = 0; *data; data++) { val = (val << ONE_EIGTH) + *data; if ((i = val & HIGH_BITS) != 0) - val = (val ^ (i >> THREE_QUARTERS)) & -HIGH_BITS; + val = (val ^ (i >> THREE_QUARTERS)) & ~HIGH_BITS; } return val;