Merge pull request #414 from arcoRocks/patch-4

fix for #413
This commit is contained in:
Jason Turner 2018-03-01 10:42:55 -07:00 committed by GitHub
commit 9c5514f1b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -110,7 +110,7 @@ namespace chaiscript
{
return json::JSON(bn.get_as<double>());
} else {
return json::JSON(bn.get_as<long>());
return json::JSON(bn.get_as<std::int64_t>());
}
} catch (const chaiscript::detail::exception::bad_any_cast &) {
// not a number

View File

@ -1,2 +1,3 @@
assert_equal(from_json("100"), 100)
assert_equal(from_json("-100"), -100)
assert_equal(to_json(4294967295), "4294967295")