diff options
Diffstat (limited to 'src/ngircd/irc.c')
| -rw-r--r-- | src/ngircd/irc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ngircd/irc.c b/src/ngircd/irc.c index 15bb90f7..5325b52a 100644 --- a/src/ngircd/irc.c +++ b/src/ngircd/irc.c @@ -563,7 +563,9 @@ Send_Message(CLIENT * Client, REQUEST * Req, int ForceType, bool SendErrors) currentTarget = strtok_r(currentTarget, ",", &strtok_last); ngt_UpperStr(Req->command); - while (true) { + /* Please note that "currentTarget" is NULL when the target contains + * the separator character only, e. g. "," or ",,,," etc.! */ + while (currentTarget) { /* Make sure that there hasn't been such a target already: */ targets[target_nr++] = currentTarget; for(i = 0; i < target_nr - 1; i++) { |