• Eli Fidler's avatar
    fix undefined double to uint64_t cast · c52cec7e
    Eli Fidler authored
    note that std::numeric_limits<uint64_t>::max() and
    std::numeric_limits<int64_t>::max() aren't exactly representable in a
    double, so we need to be strictly less to be definitely lossless
    
    UBSAN gave during Value.IsLosslessDouble test:
    include/rapidjson/document.h:955:42: runtime error: value 1.84467e+19 is outside the range of representable values of type 'unsigned long'
    c52cec7e
valuetest.cpp 53.7 KB