From 3b5942428f8c56aa76f5e1fd580aaee5f71bc5c6 Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Sun, 26 Apr 2026 00:12:39 +0200 Subject: Explicit cast (int -> enum) --- FICS/lists.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/FICS/lists.c b/FICS/lists.c index 8c0ab6b..e1a702d 100644 --- a/FICS/lists.c +++ b/FICS/lists.c @@ -256,7 +256,12 @@ list_findpartial(int p, char *which, int gonnado) return NULL; } - gl = list_find(p, foundit); + if (foundit >= L_ADMIN && foundit <= L_CHANNEL) // XXX + gl = list_find(p, (enum ListWhich)foundit); + else { + warnx("%s: 'foundit' = %d (out-of-bounds)", __func__, + foundit); + } } else { pprintf(p, "\"%s\" does not match any list name.\n", which); return NULL; -- cgit v1.2.3