File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1143,7 +1143,7 @@ inline packer<Stream>& packer<Stream>::pack_float(float d)
11431143 if (d >= 0 && d <= float (std::numeric_limits<uint64_t >::max ()) && d == float (uint64_t (d))) {
11441144 pack_imp_uint64 (uint64_t (d));
11451145 return *this ;
1146- } else if (d >= float (std::numeric_limits<int64_t >::min ()) && d == float (int64_t (d))) {
1146+ } else if (d < 0 && d >= float (std::numeric_limits<int64_t >::min ()) && d == float (int64_t (d))) {
11471147 pack_imp_int64 (int64_t (d));
11481148 return *this ;
11491149 }
@@ -1165,7 +1165,7 @@ inline packer<Stream>& packer<Stream>::pack_double(double d)
11651165 if (d >= 0 && d <= double (std::numeric_limits<uint64_t >::max ()) && d == double (uint64_t (d))) {
11661166 pack_imp_uint64 (uint64_t (d));
11671167 return *this ;
1168- } else if (d >= double (std::numeric_limits<int64_t >::min ()) && d == double (int64_t (d))) {
1168+ } else if (d < 0 && d >= double (std::numeric_limits<int64_t >::min ()) && d == double (int64_t (d))) {
11691169 pack_imp_int64 (int64_t (d));
11701170 return *this ;
11711171 }
You can’t perform that action at this time.
0 commit comments