This commit is contained in:
chenguoping committed 2020-05-15 17:35:43 +08:00
1 parent e175150f5b
commit 779a0ec7df
3 files changed
+61 -3

No files matched your search

@@ -194,7 +194,8 @@ class binary_writer
}
else
{
if (j.m_value.number_float < std::numeric_limits<float>::max() and
if (j.m_value.number_float > -std::numeric_limits<float>::min() and
j.m_value.number_float < std::numeric_limits<float>::max() and
static_cast<double>(static_cast<float>(j.m_value.number_float)) == j.m_value.number_float)
{
oa->write_character(get_cbor_float_prefix(static_cast<float>(j.m_value.number_float)));