diff options
Diffstat (limited to 'lib/libpammap.c')
-rw-r--r-- | lib/libpammap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libpammap.c b/lib/libpammap.c index 663fe3c5..f73ec45e 100644 --- a/lib/libpammap.c +++ b/lib/libpammap.c @@ -33,11 +33,11 @@ pnm_hashtuple(struct pam * const pamP, -----------------------------------------------------------------------------*/ unsigned int i; unsigned int hash; - const unsigned int hash_factor[] = {33023, 30013, 27011}; + const unsigned int hash_factor[] = {33*33, 33, 1}; hash = 0; /* initial value */ for (i = 0; i < MIN(pamP->depth, 3); ++i) { - hash += tuple[i] * hash_factor[i]; /* May overflow */ + hash += tuple[i] * hash_factor[i]; } hash %= HASH_SIZE; return hash; |