From 47e8547c32b2f01580b5055097ba80220f7f348f Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Wed, 3 Jan 2024 03:51:22 +0100 Subject: GetPlayerInfo: added usage of ARRAY_SIZE() --- FICS/makerank.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/FICS/makerank.c b/FICS/makerank.c index 3523782..22dad8a 100644 --- a/FICS/makerank.c +++ b/FICS/makerank.c @@ -12,6 +12,7 @@ #include #endif +#include "common.h" #include "makerank.h" static ENTRY **list; @@ -31,7 +32,7 @@ GetPlayerInfo(char *fileName, ENTRY *e) e->computer = 0; - for (i = 0; i < 4; i++) { + for (i = 0; i < ARRAY_SIZE(e->r); i++) { e->r[i].num = 0; e->r[i].rating = 0; } -- cgit v1.2.3