🚧 WIP for #4552

This commit is contained in:
Niels Lohmann
2024-12-18 09:47:23 +01:00
parent 30cd44df95
commit 4d67e127aa
4 changed files with 25 additions and 1 deletions

View File

@@ -529,6 +529,12 @@ class serializer
// thus removing/ignoring the invalid characters
bytes = bytes_after_last_accept;
// fix for #4552
if (error_handler == error_handler_t::ignore)
{
bytes += undumped_chars;
}
if (error_handler == error_handler_t::replace)
{
// add a replacement character