summaryrefslogtreecommitdiffstats
path: root/src/state.cc
diff options
context:
space:
mode:
authorScott Graham <scottmg@chromium.org>2014-11-09 07:10:34 (GMT)
committerScott Graham <scottmg@chromium.org>2014-11-09 07:10:34 (GMT)
commitbbeee64de290de274703c64b81d3704bd0a503e0 (patch)
tree85a6d3f9595bf14fc5bf018a74c918e6dc5ecf83 /src/state.cc
parent4ee1cb54d77d902a0223ebde12dff3b3efec8a8d (diff)
downloadNinja-bbeee64de290de274703c64b81d3704bd0a503e0.zip
Ninja-bbeee64de290de274703c64b81d3704bd0a503e0.tar.gz
Ninja-bbeee64de290de274703c64b81d3704bd0a503e0.tar.bz2
assert no slashes in default GetNode
Diffstat (limited to 'src/state.cc')
-rw-r--r--src/state.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/state.cc b/src/state.cc
index b6c29ff..7d1d79d 100644
--- a/src/state.cc
+++ b/src/state.cc
@@ -112,6 +112,9 @@ Edge* State::AddEdge(const Rule* rule) {
}
Node* State::GetNode(StringPiece path) {
+#if defined(_WIN32) && !defined(NDEBUG)
+ assert(strpbrk(path.AsString().c_str(), "/\\") == NULL);
+#endif
return GetNode(path, 0);
}