From 09609a5bca118a1d46d3cb3f6104eefc161e64f8 Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Tue, 2 Apr 2024 02:34:42 +0200 Subject: Null check --- FICS/ratings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FICS/ratings.c b/FICS/ratings.c index 1cebfd4..4ab7d9d 100644 --- a/FICS/ratings.c +++ b/FICS/ratings.c @@ -1499,7 +1499,7 @@ DisplayRankedPlayers(int p, int start, int end, int show, int showComp) PUBLIC int ShowFromString(char *s) { - int len = strlen(s); + int len = strlen(s ? s : ""); int show = 0; if (s == NULL || s[0] == '\0') -- cgit v1.2.3