X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fhashcomp.cpp;h=18846737f1cf7a53b68f053858bafd19a714e2fb;hb=f08e4a94e46dbbb64e2f29a8147355355e572108;hp=1bcb538f6f499e37ba71788be1a9e9b7164f4cb7;hpb=b3e3b1f14e12b4b0a395ef8e2a4848f132e2c22b;p=user%2Fhenk%2Fcode%2Finspircd.git 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 &result, int max_li irc::stringjoiner::stringjoiner(const std::string &seperator, const std::vector &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 &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