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
commit5d6de9e0f527db9658b05b877496c824faa96c55 (patch)
tree981ce3f4dd57f28762461e6172cd0c93d8338afe /server.c
parentAdd server map generation (diff)
downloadtorus-5d6de9e0f527db9658b05b877496c824faa96c55.tar.gz
torus-5d6de9e0f527db9658b05b877496c824faa96c55.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 7312dba..0a8f365 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;