about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2018-05-28T12·54+0200
committerGitHub <noreply@github.com>2018-05-28T12·54+0200
commitbd56b5fe3f5374e845fd58f8ecd9e111f2e5104c (patch)
tree1a98d3a4cb107c12acc7ad5d06af955dfa7f9eeb /src
parentd820717bc667ed7da54f6c6ddac8fce710727b87 (diff)
parent7f560b81eae47f876cb652b0014f55af0c711dfd (diff)
Merge pull request #2187 from bgamari/stoi-exceptions
json-to-value: Use strtol instead of strtoi
Diffstat (limited to 'src')
-rw-r--r--src/libexpr/json-to-value.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libexpr/json-to-value.cc b/src/libexpr/json-to-value.cc
index 8b1404595548..3f6017957782 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) {