1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Fix the node hash function in RTREE to ensure that it always returns a

non-negative value.

FossilOrigin-Name: 0bf4c70a6849da74797e8616a4f3730492ad02882ae67a0fe0f3b3cc3f1043b4
This commit is contained in:
drh
2018-12-21 18:17:35 +00:00
parent 273e01b4c6
commit 687e20079c
3 changed files with 9 additions and 9 deletions

View File

@ -565,8 +565,8 @@ static void nodeZero(Rtree *pRtree, RtreeNode *p){
** Given a node number iNode, return the corresponding key to use
** in the Rtree.aHash table.
*/
static int nodeHash(i64 iNode){
return iNode % HASHSIZE;
static unsigned int nodeHash(i64 iNode){
return ((unsigned)iNode) % HASHSIZE;
}
/*