mirror of
https://github.com/nlohmann/json.git
synced 2026-10-08 23:47:13 +00:00
🐛 fixed a bug if parser was called with a stream at EOF (#367)
This commit is contained in:
1 parent
e3450cac72
commit
dfc49e7afe
2 files changed
+8
-2
No files matched your search
+4
-1
@@ -8743,7 +8743,10 @@ basic_json_parser_66:
|
|||||||
// append n characters to make sure that there is sufficient
|
// append n characters to make sure that there is sufficient
|
||||||
// space between m_cursor and m_limit
|
// space between m_cursor and m_limit
|
||||||
m_line_buffer.append(1, '\x00');
|
m_line_buffer.append(1, '\x00');
|
||||||
m_line_buffer.append(n - 1, '\x01');
|
if (n > 0)
|
||||||
|
{
|
||||||
|
m_line_buffer.append(n - 1, '\x01');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
+4
-1
@@ -7892,7 +7892,10 @@ class basic_json
|
|||||||
// append n characters to make sure that there is sufficient
|
// append n characters to make sure that there is sufficient
|
||||||
// space between m_cursor and m_limit
|
// space between m_cursor and m_limit
|
||||||
m_line_buffer.append(1, '\x00');
|
m_line_buffer.append(1, '\x00');
|
||||||
m_line_buffer.append(n - 1, '\x01');
|
if (n > 0)
|
||||||
|
{
|
||||||
|
m_line_buffer.append(n - 1, '\x01');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user