diff options
| author | Franklin Wei <git@fwei.tk> | 2016-01-23 15:25:34 -0500 |
|---|---|---|
| committer | Franklin Wei <git@fwei.tk> | 2016-01-23 15:25:34 -0500 |
| commit | 636634f244bbe04c703b5019f26578ac5441fefd (patch) | |
| tree | 488a725b47f8bcc925f78b59665231742cf80a41 /src/room.c | |
| parent | bb90172cbaa3a38f58293982a38f6854d9afe1f9 (diff) | |
| download | netcosm-636634f244bbe04c703b5019f26578ac5441fefd.zip netcosm-636634f244bbe04c703b5019f26578ac5441fefd.tar.gz netcosm-636634f244bbe04c703b5019f26578ac5441fefd.tar.bz2 netcosm-636634f244bbe04c703b5019f26578ac5441fefd.tar.xz | |
stuff
Diffstat (limited to 'src/room.c')
| -rw-r--r-- | src/room.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -175,7 +175,7 @@ bool world_load(const char *fname, const struct roomdata_t *data, size_t data_sz for(unsigned i = 0; i < world_sz; ++i) { - world[i].users = hash_init((userdb_size() + 1) / 2, pid_hash, pid_equal); + world[i].users = hash_init((userdb_size() / 2) + 1, pid_hash, pid_equal); world[i].id = read_roomid(fd); memcpy(&world[i].data, data + i, sizeof(struct roomdata_t)); @@ -227,7 +227,7 @@ void world_init(const struct roomdata_t *data, size_t sz, const char *name) } } - world[i].users = hash_init((userdb_size() + 1) / 2, pid_hash, pid_equal); + world[i].users = hash_init((userdb_size() / 2) + 1, pid_hash, pid_equal); world_sz = i + 1; } |