X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcommands.cpp;h=427633ef4663e8e81554ff40cecfb7ac8fdd533b;hb=a9621bc98996e08d86734e6848de13223341ea64;hp=bcdf4971d8a970b738973ab589e4805d653bec8c;hpb=f25755bbe748f65eb17f8e25507160569f8f4041;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/commands.cpp b/src/commands.cpp index bcdf4971d..427633ef4 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -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;