]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/commands.cpp
Fix CIDR functions so they work
[user/henk/code/inspircd.git] / src / commands.cpp
index bcdf4971d8a970b738973ab589e4805d653bec8c..427633ef4663e8e81554ff40cecfb7ac8fdd533b 100644 (file)
@@ -85,7 +85,7 @@ void split_chlist(userrec* user, userrec* dest, const std::string &cl)
        prefix << ":" << Config->ServerName << " 319 " << user->nick << " " << dest->nick << " :";
        line = prefix.str();
        
-       for (start = 0; pos = cl.find(' ', start); start = pos+1)
+       for (start = 0; (pos = cl.find(' ', start)) != std::string::npos; start = pos+1)
        {
                length = (pos == std::string::npos) ? cl.length() : pos;