commit | 3623d038f0454d2aeb0ae6a9065aedb897d3d849 | [log] [tgz] |
---|---|---|
author | Thomas Daede <tdaede@mozilla.com> | Thu Jul 20 21:17:46 2017 -0700 |
committer | Thomas Daede <tdaede@mozilla.com> | Fri Jul 21 07:12:38 2017 +0000 |
tree | c65761b70f98311327e92d814306d008ca7e97a3 | |
parent | 86ad10c7d1d14661790440c81ce82232e1c98014 [diff] |
Fix escaping backslashes in JSON in inspect.c. Change-Id: I1a43ed3c13ce1f8a0a6673f8d54fc82abcfeca5b
diff --git a/examples/inspect.c b/examples/inspect.c index 546ec29..5c54c55 100644 --- a/examples/inspect.c +++ b/examples/inspect.c
@@ -258,7 +258,7 @@ int i; int j = 0; for (i = 0; str[i] != '\0'; i++) { - if (str[i] == '"') { + if (str[i] == '"' || str[i] == '\\') { buffer[j++] = '\\'; } buffer[j++] = str[i];