Commit c1801fa4 authored by Marvin Scholz's avatar Marvin Scholz

misc/json: Fix check for json_relaxed_commas

The negation would only apply to the left operand (settings) and not the
full expression, which is likely not what was intended.
parent d3859f36
......@@ -374,7 +374,7 @@ json_value * json_parse_ex (json_settings * settings, const json_char * json, ch
if (top->type == json_array)
flags = (flags & ~ (flag_need_comma | flag_seek_value)) | flag_next;
else if (!state.settings.settings & json_relaxed_commas)
else if (!(state.settings.settings & json_relaxed_commas))
{ sprintf (error, "%d:%d: Unexpected ]", cur_line, e_off);
goto e_failed;
}
......@@ -529,7 +529,7 @@ json_value * json_parse_ex (json_settings * settings, const json_char * json, ch
case '"':
if (flags & flag_need_comma && (!state.settings.settings & json_relaxed_commas))
if (flags & flag_need_comma && !(state.settings.settings & json_relaxed_commas))
{
sprintf (error, "%d:%d: Expected , before \"", cur_line, e_off);
goto e_failed;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment