- Fixed 'limit:N' bug, whereby when a report specifies a limit, and
  the user overrides it, there are potentially two limit arguments,
  in which case the last one, not the first one is needed.
This commit is contained in:
Paul Beckingham 2011-06-26 15:19:14 -04:00
parent 37edd06027
commit 1b90adc1aa
2 changed files with 2 additions and 3 deletions

View file

@ -673,8 +673,8 @@ bool Arguments::find_command (std::string& command)
////////////////////////////////////////////////////////////////////////////////
std::string Arguments::find_limit ()
{
std::vector <std::pair <std::string, std::string> >::iterator arg;
for (arg = this->begin (); arg != this->end (); ++arg)
std::vector <std::pair <std::string, std::string> >::reverse_iterator arg;
for (arg = this->rbegin (); arg != this->rend (); ++arg)
if (arg->first.find ("limit:") != std::string::npos)
return arg->first.substr (6);

View file

@ -25,7 +25,6 @@
//
////////////////////////////////////////////////////////////////////////////////
#include <iostream>
#include <sstream>
#include <map>
#include <vector>