json: fix escaping of '\'

(cherry picked from r13-965-g4f9ad0b4b0a8c7)

gcc/ChangeLog:
	* json.cc (string::print): Fix escaping of '\'.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
This commit is contained in:
David Malcolm 2022-07-27 17:38:54 -04:00
parent 1d38fa564e
commit 6fd39b0604
1 changed files with 1 additions and 1 deletions

View File

@ -207,7 +207,7 @@ string::print (pretty_printer *pp) const
pp_string (pp, "\\\"");
break;
case '\\':
pp_string (pp, "\\n");
pp_string (pp, "\\\\");
break;
case '\b':
pp_string (pp, "\\b");