[vlc-devel] [PATCH] misc/json: Fix check for json_relaxed_commas
Marvin Scholz
epirat07 at gmail.com
Thu Mar 29 11:08:45 CEST 2018
The negation would only apply to the left operand (settings) and not the
full expression, which is likely not what was intended.
---
modules/misc/webservices/json.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/misc/webservices/json.c b/modules/misc/webservices/json.c
index 0afc01c614..d34afdeab9 100644
--- a/modules/misc/webservices/json.c
+++ b/modules/misc/webservices/json.c
@@ -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;
--
2.14.3 (Apple Git-98)
More information about the vlc-devel
mailing list