diff options
Diffstat (limited to 'src/authdb.c')
-rw-r--r-- | src/authdb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/authdb.c b/src/authdb.c index ed309fe..8bbf372 100644 --- a/src/authdb.c +++ b/src/authdb.c @@ -155,9 +155,9 @@ void *authdb_get(struct authdb *adb, sockaddr_any *addr, struct authdb_entry *en return NULL; e = (unsigned char) b.ptr[0]; - b.ptr[0] = 0x00; + b.ptr[3] = 0x00; - hash = b.ptr[1] + b.ptr[2] + b.ptr[3]; + hash = b.ptr[0] + b.ptr[1] + b.ptr[2]; hash %= ARRAY_SIZE(adb->hash_bucket); for (me = adb->hash_bucket[hash]; me != NULL; me = me->next) { |