Skip to content

Commit

Permalink
Fix std::stoi exception
Browse files Browse the repository at this point in the history
  • Loading branch information
edolstra committed Mar 8, 2017
1 parent edebdf3 commit 73900e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hydra-queue-runner/hydra-queue-runner.cc
Expand Up @@ -52,7 +52,7 @@ struct Config
uint64_t getIntOption(const std::string & key, uint64_t def = 0)
{
auto i = options.find(key);
return i == options.end() ? def : std::stoi(i->second);
return i == options.end() ? def : std::stoll(i->second);

This comment has been minimized.

Copy link
@dtzWill

dtzWill Apr 2, 2017

Member

std::stoull? Mostly so negative values are errors instead of very large integers :).

}

bool getBoolOption(const std::string & key, bool def = false)
Expand Down

0 comments on commit 73900e9

Please sign in to comment.