File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 114114#define JSONCPP_DEPRECATED (message )
115115#endif // if !defined(JSONCPP_DEPRECATED)
116116
117+ #if __GNUC__ >= 6
118+ # define JSON_USE_INT64_DOUBLE_CONVERSION 1
119+ #endif
120+
117121namespace Json {
118122typedef int Int;
119123typedef unsigned int UInt;
Original file line number Diff line number Diff line change @@ -784,7 +784,8 @@ float Value::asFloat() const {
784784#if !defined(JSON_USE_INT64_DOUBLE_CONVERSION)
785785 return static_cast <float >(value_.uint_ );
786786#else // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION)
787- return integerToDouble (value_.uint_ );
787+ // This can fail (silently?) if the value is bigger than MAX_FLOAT.
788+ return static_cast <float >(integerToDouble (value_.uint_ ));
788789#endif // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION)
789790 case realValue:
790791 return static_cast <float >(value_.real_ );
You can’t perform that action at this time.
0 commit comments