aboutsummaryrefslogtreecommitdiffstats
path: root/FICS/lists.c
diff options
context:
space:
mode:
Diffstat (limited to 'FICS/lists.c')
-rw-r--r--FICS/lists.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/FICS/lists.c b/FICS/lists.c
index d9879d4..e3f2873 100644
--- a/FICS/lists.c
+++ b/FICS/lists.c
@@ -60,7 +60,14 @@ list_find(int p, enum ListWhich l)
int personal;
personal = ListArray[l].rights == P_PERSONAL;
- starter = (personal ? &parray[p].lists : &firstGlobalList);
+
+ if (personal) {
+ if (p < 0)
+ return NULL;
+ starter = &parray[p].lists;
+ } else {
+ starter = &firstGlobalList;
+ }
for (tempList = *starter; tempList != NULL; tempList = tempList->next) {
if (l == tempList->which) {