1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-13 20:21:48 +03:00

🐛 fixed a bug if parser was called with a stream at EOF (#367)

This commit is contained in:
Niels Lohmann
2016-11-24 21:45:10 +01:00
parent e3450cac72
commit dfc49e7afe
2 changed files with 8 additions and 2 deletions

View File

@ -7892,7 +7892,10 @@ class basic_json
// append n characters to make sure that there is sufficient
// space between m_cursor and m_limit
m_line_buffer.append(1, '\x00');
m_line_buffer.append(n - 1, '\x01');
if (n > 0)
{
m_line_buffer.append(n - 1, '\x01');
}
}
else
{