From 515992ffca07b2aeb6c13b333b194e42e5a1fe34 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Thu, 19 Jul 2018 15:44:16 -0400 Subject: Add ARRAY_LEN macro --- server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server.c') 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; -- cgit 1.4.1