mirror of
https://github.com/nlohmann/json.git
synced 2026-06-06 12:49:43 +00:00
🐛 use correct indentation character on resize
Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
@@ -19302,7 +19302,7 @@ class serializer
|
||||
const auto new_indent = current_indent + indent_step;
|
||||
if (JSON_HEDLEY_UNLIKELY(indent_string.size() < new_indent))
|
||||
{
|
||||
indent_string.resize(indent_string.size() * 2, ' ');
|
||||
indent_string.resize(indent_string.size() * 2, indent_char);
|
||||
}
|
||||
|
||||
// first n-1 elements
|
||||
@@ -19375,7 +19375,7 @@ class serializer
|
||||
const auto new_indent = current_indent + indent_step;
|
||||
if (JSON_HEDLEY_UNLIKELY(indent_string.size() < new_indent))
|
||||
{
|
||||
indent_string.resize(indent_string.size() * 2, ' ');
|
||||
indent_string.resize(indent_string.size() * 2, indent_char);
|
||||
}
|
||||
|
||||
// first n-1 elements
|
||||
@@ -19436,7 +19436,7 @@ class serializer
|
||||
const auto new_indent = current_indent + indent_step;
|
||||
if (JSON_HEDLEY_UNLIKELY(indent_string.size() < new_indent))
|
||||
{
|
||||
indent_string.resize(indent_string.size() * 2, ' ');
|
||||
indent_string.resize(indent_string.size() * 2, indent_char);
|
||||
}
|
||||
|
||||
o->write_characters(indent_string.c_str(), new_indent);
|
||||
|
||||
Reference in New Issue
Block a user