diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-07-12 20:24:06 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-07-12 20:24:06 +0000 |
commit | 12ffb909a66401f540234aecbeeee6f94ef2fc6d (patch) | |
tree | 1ef1b7e9a0817148315248542e06fb2be9041dda /src/hashcomp.cpp | |
parent | ea7694a8dbdaa7b77b787add711df1b6e5ace95d (diff) |
Fix for bug #569, thanks dz.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9986 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/hashcomp.cpp')
-rw-r--r-- | src/hashcomp.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/hashcomp.cpp b/src/hashcomp.cpp index 1bcb538f6..18846737f 100644 --- a/src/hashcomp.cpp +++ b/src/hashcomp.cpp @@ -382,6 +382,9 @@ int irc::modestacker::GetStackedLine(std::deque<std::string> &result, int max_li irc::stringjoiner::stringjoiner(const std::string &seperator, const std::vector<std::string> &sequence, int begin, int end) { + if (end < begin) + throw "stringjoiner logic error, this causes problems."; + for (int v = begin; v < end; v++) joined.append(sequence[v]).append(seperator); joined.append(sequence[end]); @@ -389,6 +392,9 @@ irc::stringjoiner::stringjoiner(const std::string &seperator, const std::vector< irc::stringjoiner::stringjoiner(const std::string &seperator, const std::deque<std::string> &sequence, int begin, int end) { + if (end < begin) + throw "stringjoiner logic error, this causes problems."; + for (int v = begin; v < end; v++) joined.append(sequence[v]).append(seperator); joined.append(sequence[end]); @@ -396,6 +402,9 @@ irc::stringjoiner::stringjoiner(const std::string &seperator, const std::deque<s irc::stringjoiner::stringjoiner(const std::string &seperator, const char* const* sequence, int begin, int end) { + if (end < begin) + throw "stringjoiner logic error, this causes problems."; + for (int v = begin; v < end; v++) joined.append(sequence[v]).append(seperator); joined.append(sequence[end]); |