Skip to content
Permalink
Browse files

Fix faulty assoc if test

Found by: dcb314
Patch by: Geo
Fixes #907
  • Loading branch information
vanosg committed Nov 27, 2019
1 parent 1910799 commit bb69267d48066a7e479b1b264335f6f1edfca767
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/mod/assoc.mod/assoc.c
@@ -319,7 +319,7 @@ static void zapf_assoc(char *botnick, char *code, char *par)
linking = b_status(idx) & STAT_LINKING;
s = newsplit(&par);
chan = base64_to_int(s);
if ((chan > 0) || (chan < GLOBAL_CHANS)) {
if ((chan > 0) && (chan < GLOBAL_CHANS)) {
nick = newsplit(&par);
s1 = get_assoc_name(chan);
if (linking && ((s1 == NULL) || (s1[0] == 0) ||
@@ -336,6 +336,8 @@ static void zapf_assoc(char *botnick, char *code, char *par)
add_assoc(par, chan);
chanout_but(-1, chan, ASSOC_CHNAME_NAMED2, botnick, nick, par);
}
} else {
dprintf(LOG_DEBUG, "ASSOC: Channel number outside bounds\n");
}
}
}

0 comments on commit bb69267

Please sign in to comment.
You can’t perform that action at this time.