r3179 - trunk/data/qcsrc/common
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Fri Jan 18 20:49:25 EST 2008
Author: div0
Date: 2008-01-18 20:49:25 -0500 (Fri, 18 Jan 2008)
New Revision: 3179
Modified:
trunk/data/qcsrc/common/util.qc
Log:
oops, tiny bug in using the hash function ;)
Modified: trunk/data/qcsrc/common/util.qc
===================================================================
--- trunk/data/qcsrc/common/util.qc 2008-01-19 01:47:28 UTC (rev 3178)
+++ trunk/data/qcsrc/common/util.qc 2008-01-19 01:49:25 UTC (rev 3179)
@@ -275,14 +275,14 @@
string db_get(float db, string key)
{
float h;
- h = hash(FALSE, key);
+ h = math_mod(hash(FALSE, key), DB_BUCKETS);
return infoget(bufstr_get(db, h), key);
}
void db_put(float db, string key, string value)
{
float h;
- h = hash(FALSE, key);
+ h = math_mod(hash(FALSE, key), DB_BUCKETS);
bufstr_set(db, h, infoadd(bufstr_get(db, h), key, value));
}
More information about the nexuiz-commits
mailing list