diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2025-04-05 13:52:08 +0200 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2025-04-05 13:52:08 +0200 |
commit | 7bfabbc90257c65b72af14d4c076f9497a39e1dd (patch) | |
tree | d9dec7885d1b7c97ed1fa32c6901902c0437c4ae /FICS | |
parent | 938868f5086087b4d75c9e0820c00755af7ecc5e (diff) |
t_sft: strncmp: null checking
Diffstat (limited to 'FICS')
-rw-r--r-- | FICS/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |