forked from lix-project/hydra
Fix std::stoi exception
This commit is contained in:
parent
edebdf33f0
commit
73900e9f5f
|
@ -52,7 +52,7 @@ struct Config
|
||||||
uint64_t getIntOption(const std::string & key, uint64_t def = 0)
|
uint64_t getIntOption(const std::string & key, uint64_t def = 0)
|
||||||
{
|
{
|
||||||
auto i = options.find(key);
|
auto i = options.find(key);
|
||||||
return i == options.end() ? def : std::stoi(i->second);
|
return i == options.end() ? def : std::stoll(i->second);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool getBoolOption(const std::string & key, bool def = false)
|
bool getBoolOption(const std::string & key, bool def = false)
|
||||||
|
|
Loading…
Reference in a new issue