summaryrefslogtreecommitdiffstats
path: root/misc/json.c
diff options
context:
space:
mode:
Diffstat (limited to 'misc/json.c')
-rw-r--r--misc/json.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/misc/json.c b/misc/json.c
index b301296ebe..8252511408 100644
--- a/misc/json.c
+++ b/misc/json.c
@@ -85,8 +85,9 @@ static int read_str(void *ta_parent, struct mpv_node *dst, char **src)
while (cur[0] && cur[0] != '"') {
if (cur[0] == '\\') {
has_escapes = true;
- if (cur[1] == '"')
- cur++; // skip \"
+ // skip >\"< and >\\< (latter to handle >\\"< correctly)
+ if (cur[1] == '"' || cur[1] == '\\')
+ cur++;
}
cur++;
}