diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2018-05-28 14:54:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-28 14:54:49 +0200 |
commit | bd56b5fe3f5374e845fd58f8ecd9e111f2e5104c (patch) | |
tree | 1a98d3a4cb107c12acc7ad5d06af955dfa7f9eeb /src/libexpr | |
parent | d820717bc667ed7da54f6c6ddac8fce710727b87 (diff) | |
parent | 7f560b81eae47f876cb652b0014f55af0c711dfd (diff) |
Merge pull request #2187 from bgamari/stoi-exceptions
json-to-value: Use strtol instead of strtoi
Diffstat (limited to 'src/libexpr')
-rw-r--r-- | src/libexpr/json-to-value.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libexpr/json-to-value.cc b/src/libexpr/json-to-value.cc index 8b1404595..3f6017957 100644 --- a/src/libexpr/json-to-value.cc +++ b/src/libexpr/json-to-value.cc @@ -110,7 +110,7 @@ static void parseJSON(EvalState & state, const char * & s, Value & v) if (number_type == tFloat) mkFloat(v, stod(tmp_number)); else - mkInt(v, stoi(tmp_number)); + mkInt(v, stol(tmp_number)); } catch (std::invalid_argument e) { throw JSONParseError("invalid JSON number"); } catch (std::out_of_range e) { |