public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] json: fix escaping of '\'
@ 2022-06-02 19:44 David Malcolm
  0 siblings, 0 replies; only message in thread
From: David Malcolm @ 2022-06-02 19:44 UTC (permalink / raw)
  To: gcc-patches

Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r13-965-g4f9ad0b4b0a8c7.

gcc/ChangeLog:
	* json.cc (string::print): Fix escaping of '\'.
---
 gcc/json.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/json.cc b/gcc/json.cc
index 3bf9b61a641..974f8c36825 100644
--- a/gcc/json.cc
+++ b/gcc/json.cc
@@ -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");
-- 
2.26.3


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-02 19:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-02 19:44 [committed] json: fix escaping of '\' David Malcolm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).