Skip to content

Commit

Permalink
Really fix DiceServData::HasExtended(), earlier fix wasn't working.
Browse files Browse the repository at this point in the history
(Also replacing v3.0.3 tag to here.)
  • Loading branch information
CyberBotX committed Apr 1, 2017
1 parent 1331dd6 commit cb66ff3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions diceserv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2520,10 +2520,14 @@ void DiceServData::SendReply(CommandSource &source, const Anope::string &output)

bool DiceServData::HasExtended() const
{
bool opResultsHasExtended = false;
for (int i = 0, len = this->opResults.size(); i < len; ++i)
if (this->opResults[i].empty())
return false;
return !this->timesPart.empty() && !this->timesResults.empty();
if (!this->opResults[i].empty())
{
opResultsHasExtended = true;
break;
}
return (!this->timesPart.empty() && !this->timesResults.empty()) || opResultsHasExtended;
}

/** A middleman service to prevent the need for most of DiceServData's code being in the header (and thus only defined once here in the core).
Expand Down

0 comments on commit cb66ff3

Please sign in to comment.