aboutsummaryrefslogtreecommitdiffstats
path: root/FICS/lists.c
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2026-04-26 00:12:39 +0200
committerMarkus Uhlin <markus@nifty-networks.net>2026-04-26 00:12:39 +0200
commit3b5942428f8c56aa76f5e1fd580aaee5f71bc5c6 (patch)
tree223dafd5f5306dfa2336e5530a6093672082c0ca /FICS/lists.c
parent1731ad5172859afac80e4f5f0af26694ca823635 (diff)
Explicit cast (int -> enum)
Diffstat (limited to 'FICS/lists.c')
-rw-r--r--FICS/lists.c7
1 files changed, 6 insertions, 1 deletions
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;