1
0
mirror of https://github.com/nlohmann/json synced 2024-12-24 17:41:05 +00:00

🚨 fixed PVS V567 warning

"V567 The modification of the 'position.chars_read_current_line' variable is unsequenced relative to another operation on the same variable. This may lead to undefined behavior."
This commit is contained in:
Niels Lohmann 2018-12-30 23:00:15 +01:00
parent 6f89613acd
commit c682b9879b
No known key found for this signature in database
GPG Key ID: 7F3CEA63AE251B69
2 changed files with 2 additions and 2 deletions

View File

@ -1262,7 +1262,7 @@ scan_number_done:
if (current == '\n')
{
++position.lines_read;
++position.chars_read_current_line = 0;
position.chars_read_current_line = 0;
}
return current;

View File

@ -3829,7 +3829,7 @@ scan_number_done:
if (current == '\n')
{
++position.lines_read;
++position.chars_read_current_line = 0;
position.chars_read_current_line = 0;
}
return current;