2
0
mirror of https://github.com/boostorg/json.git synced 2026-02-01 08:32:13 +00:00

fix handling of comment after trailing comma

This commit is contained in:
Dmitry Arkhipov
2022-06-30 18:01:14 +03:00
parent 5874418faa
commit 75367a814e
2 changed files with 13 additions and 1 deletions

View File

@@ -1894,6 +1894,7 @@ do_arr1:
return maybe_suspend(cs.begin(), state::arr1, size);
if(BOOST_JSON_LIKELY(*cs != ']'))
{
loop:
if(allow_comments && *cs == '/')
{
do_arr2:
@@ -1902,7 +1903,6 @@ do_arr2:
return suspend_or_fail(state::arr2, size);
goto do_arr1;
}
loop:
if(BOOST_JSON_UNLIKELY(++size >
Handler::max_array_size))
{