summaryrefslogtreecommitdiff
path: root/ext/sqlite/libsqlite/src/hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/sqlite/libsqlite/src/hash.c')
-rw-r--r--ext/sqlite/libsqlite/src/hash.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/sqlite/libsqlite/src/hash.c b/ext/sqlite/libsqlite/src/hash.c
index 60de7aa1e2..aa3bb81c44 100644
--- a/ext/sqlite/libsqlite/src/hash.c
+++ b/ext/sqlite/libsqlite/src/hash.c
@@ -108,8 +108,7 @@ static int binHash(const void *pKey, int nKey){
while( nKey-- > 0 ){
h = (h<<3) ^ h ^ *(z++);
}
- if( h<0 ) h = -h;
- return h;
+ return h & 0x7fffffff;
}
static int binCompare(const void *pKey1, int n1, const void *pKey2, int n2){
if( n1!=n2 ) return n2-n1;