mirror of
https://github.com/nlohmann/json.git
synced 2025-07-28 12:02:00 +03:00
@ -11510,7 +11510,7 @@ class serializer
|
||||
if (is_negative)
|
||||
{
|
||||
*buffer_ptr = '-';
|
||||
abs_value = static_cast<number_unsigned_t>(0 - x);
|
||||
abs_value = static_cast<number_unsigned_t>(-1 - x) + 1;
|
||||
|
||||
// account one more byte for the minus sign
|
||||
n_chars = 1 + count_digits(abs_value);
|
||||
|
Reference in New Issue
Block a user