Fix preventing show crashing with newer graphviz
authorMiodrag Milanovic <mmicko@gmail.com>
Fri, 3 Jun 2022 06:38:16 +0000 (08:38 +0200)
committerMiodrag Milanovic <mmicko@gmail.com>
Fri, 3 Jun 2022 06:38:16 +0000 (08:38 +0200)
passes/cmds/show.cc

index 35aa410e489bd6617e413aab00363a278317c974..43deba47b9606c70fbb55fbc775ecf19a55e3a3b 100644 (file)
@@ -191,7 +191,12 @@ struct ShowWorker
 
                std::string str;
                for (char ch : id) {
-                       if (ch == '\\' || ch == '"')
+                       if (ch == '\\') {
+                                // new graphviz have bug with escaping '\'
+                               str += "&#9586;";
+                               continue;
+                       }
+                       if (ch == '"')
                                str += "\\";
                        str += ch;
                }