From 7bfabbc90257c65b72af14d4c076f9497a39e1dd Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Sat, 5 Apr 2025 13:52:08 +0200 Subject: t_sft: strncmp: null checking --- FICS/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'FICS') diff --git a/FICS/utils.c b/FICS/utils.c index 53d233b..15a0081 100644 --- a/FICS/utils.c +++ b/FICS/utils.c @@ -967,7 +967,7 @@ PRIVATE void t_sft(const char *want, struct t_tree *t) { if (t) { - int cmp = strncmp(want, t->name, strlen(want)); + int cmp = strncmp(want ? want : "", t->name, strlen(want)); if (cmp <= 0) // If 'want' <= this one, look left t_sft(want, t->left); -- cgit v1.2.3