Browse Source

Merge 63f67ee4fb into 82f5a4ab29

pull/241/merge
scbonde GitHub 8 years ago
parent
commit
61a3cd300d
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      json_object.c
  2. +1
    -1
      tests/test_parse.c

+ 1
- 1
json_object.c View File

@@ -136,7 +136,7 @@ static int json_escape_str(struct printbuf *pb, const char *str, int len, int fl
else if(c == '\f') printbuf_memappend(pb, "\\f", 2);
else if(c == '"') printbuf_memappend(pb, "\\\"", 2);
else if(c == '\\') printbuf_memappend(pb, "\\\\", 2);
else if(c == '/') printbuf_memappend(pb, "\\/", 2);
else if(c == '/') printbuf_memappend(pb, "/", 1);

start_offset = ++pos;
break;


+ 1
- 1
tests/test_parse.c View File

@@ -309,7 +309,7 @@ struct incremental_step {
{ "\"\\n\"", -1, -1, json_tokener_success, 0 },
{ "\"\\r\"", -1, -1, json_tokener_success, 0 },
{ "\"\\t\"", -1, -1, json_tokener_success, 0 },
{ "\"\\/\"", -1, -1, json_tokener_success, 0 },
{ "\"/\"", -1, -1, json_tokener_success, 0 },
// Escaping a forward slash is optional
{ "\"/\"", -1, -1, json_tokener_success, 0 },



Loading…
Cancel
Save