pass jny: fixed the backslash escape for strings
authorAki Van Ness <aki@yosyshq.com>
Thu, 10 Mar 2022 16:03:51 +0000 (11:03 -0500)
committerJacob Lifshay <programmerjake@gmail.com>
Thu, 26 May 2022 02:36:44 +0000 (19:36 -0700)
(cherry picked from commit 2e792857e9f26078b65d969d9ad2a1c27326b330)

backends/jny/jny.cc

index 763d186ac77e338809cc6085a02c6f15259928e7..8025d42d26f47a857f487daf61dc03b10c279dbc 100644 (file)
@@ -55,8 +55,7 @@ struct JnyWriter
             for(; itr != str.end(); ++itr) {
                 switch (*itr) {
                     case '\\': {
-                        newstr += *itr++;
-                        newstr += *itr;
+                        newstr += "\\\\";
                         break;
                     } case '\n': {
                         newstr += "\\n";