diff --git a/include/chaiscript/utility/json_wrap.hpp b/include/chaiscript/utility/json_wrap.hpp index 05b9e404..656bf21d 100644 --- a/include/chaiscript/utility/json_wrap.hpp +++ b/include/chaiscript/utility/json_wrap.hpp @@ -110,7 +110,7 @@ namespace chaiscript { return json::JSON(bn.get_as()); } else { - return json::JSON(bn.get_as()); + return json::JSON(bn.get_as()); } } catch (const chaiscript::detail::exception::bad_any_cast &) { // not a number diff --git a/unittests/json_3.chai b/unittests/json_3.chai index 11ce7dcb..1308c492 100644 --- a/unittests/json_3.chai +++ b/unittests/json_3.chai @@ -1,2 +1,3 @@ assert_equal(from_json("100"), 100) assert_equal(from_json("-100"), -100) +assert_equal(to_json(4294967295), "4294967295")