diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-07-07 21:34:46 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-07-07 21:34:46 +0000 |
commit | ecaf40715404bdd476c970f17473078dd2acaabe (patch) | |
tree | 91d59b448484b935bdab78d8096cac4dc6c479e9 /src | |
parent | 92a5b10cc969812fdad06b31d4c84537eb916295 (diff) |
Avoid throwing a std::out_of_range exception when given a ban without ! or @ in it (whooops)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4150 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/mode.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mode.cpp b/src/mode.cpp index 729024861..e7ee1c3dc 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -603,7 +603,7 @@ void ModeParser::CleanMask(std::string &mask) * swap the two items over so that at least the n!u@h ordering * is correct even if the elements may not be */ - if (pos_of_pling > pos_of_at) + if (((pos_of_pling != std::string::npos) && (pos_of_at != std::string::npos)) && (pos_of_pling > pos_of_at)) { mask.replace(pos_of_pling, 1, "@"); mask.replace(pos_of_at, 1, "!"); |