about summary refs log tree commit diff homepage
path: root/server.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-07-19 15:44:16 -0400
committerJune McEnroe <june@causal.agency>2018-07-19 15:44:16 -0400
commit515992ffca07b2aeb6c13b333b194e42e5a1fe34 (patch)
treeab23be1b7e8a6ee555355153c963d933ace6fe38 /server.c
parentAdd server map generation (diff)
downloadtorus-515992ffca07b2aeb6c13b333b194e42e5a1fe34.tar.gz
torus-515992ffca07b2aeb6c13b333b194e42e5a1fe34.zip
Add ARRAY_LEN macro
Diffstat (limited to '')
-rw-r--r--server.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/server.c b/server.c
index 3a27ad4..9d0af0e 100644
--- a/server.c
+++ b/server.c
@@ -218,7 +218,7 @@ static bool clientUpdate(const struct Client *client, const struct Client *old)
 }
 
 static bool clientSpawn(struct Client *client, uint8_t spawn) {
-	if (spawn >= SPAWNS_LEN) return false;
+	if (spawn >= ARRAY_LEN(SPAWNS)) return false;
 	struct Client old = *client;
 	client->tileX = SPAWNS[spawn].tileX;
 	client->tileY = SPAWNS[spawn].tileY;