]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fix InspIRCd::StripColor() stripping characters that shouldn't be stripped
authorAttila Molnar <attilamolnar@hush.com>
Tue, 29 Dec 2015 11:40:20 +0000 (12:40 +0100)
committerAttila Molnar <attilamolnar@hush.com>
Tue, 29 Dec 2015 11:40:20 +0000 (12:40 +0100)
src/helperfuncs.cpp

index 6217eb20ba2139ca4e2dfe725a996aa55c2ee0b4..c9135679cfd0e8d6a31d4aeab4b484d1ee0685dd 100644 (file)
@@ -128,7 +128,7 @@ void InspIRCd::StripColor(std::string &sentence)
                        seq = 0;
 
                // Strip all control codes too except \001 for CTCP
-               if (seq || ((*i < 32) && (*i != 1)))
+               if (seq || ((*i >= 0) && (*i < 32) && (*i != 1)))
                        i = sentence.erase(i);
                else
                        ++i;