Fix crash in m_stripcolor on windows when the colour code is the first item on a line

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9465 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
brain 2008-04-12 14:21:15 +00:00
parent 2205c65c72
commit 4e9654e2e9

View File

@ -129,10 +129,17 @@ class ModuleStripColor : public Module
if (seq || ((*i == 2) || (*i == 15) || (*i == 22) || (*i == 21) || (*i == 31)))
{
safei = i;
--i;
sentence.erase(safei);
}
if (i != sentence.begin())
{
safei = i;
--i;
sentence.erase(safei);
}
else
{
sentence.erase(i);
i = sentence.begin();
} }
}
}