summaryrefslogtreecommitdiffstats
path: root/src/graphviz.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/graphviz.cc')
-rw-r--r--src/graphviz.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/graphviz.cc b/src/graphviz.cc
index 8354a22..dce8b32 100644
--- a/src/graphviz.cc
+++ b/src/graphviz.cc
@@ -15,6 +15,7 @@
#include "graphviz.h"
#include <stdio.h>
+#include <algorithm>
#include "graph.h"
@@ -22,7 +23,9 @@ void GraphViz::AddTarget(Node* node) {
if (visited_nodes_.find(node) != visited_nodes_.end())
return;
- printf("\"%p\" [label=\"%s\"]\n", node, node->path().c_str());
+ string pathstr = node->path();
+ replace(pathstr.begin(), pathstr.end(), '\\', '/');
+ printf("\"%p\" [label=\"%s\"]\n", node, pathstr.c_str());
visited_nodes_.insert(node);
Edge* edge = node->in_edge();