diff options
author | Nico Weber <thakis@chromium.org> | 2013-08-28 21:03:53 (GMT) |
---|---|---|
committer | Nico Weber <thakis@chromium.org> | 2013-08-28 21:03:53 (GMT) |
commit | 427614f89ffa407f028db2d8ab3aedccacac23ca (patch) | |
tree | e864320debb02f87febf3c343a0fd90d83acce59 /src | |
parent | 9940196d57d46eb8aeb1cc28a57dee290034fccf (diff) | |
download | Ninja-427614f89ffa407f028db2d8ab3aedccacac23ca.zip Ninja-427614f89ffa407f028db2d8ab3aedccacac23ca.tar.gz Ninja-427614f89ffa407f028db2d8ab3aedccacac23ca.tar.bz2 |
document an assumption
Diffstat (limited to 'src')
-rw-r--r-- | src/deps_log.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/deps_log.cc b/src/deps_log.cc index a5d726c..64ef58f 100644 --- a/src/deps_log.cc +++ b/src/deps_log.cc @@ -234,6 +234,7 @@ bool DepsLog::Load(const string& path, State* state, string* err) { ++unique_dep_record_count; } else { int path_size = size - 4; + assert(path_size > 0); // CanonicalizePath() rejects empty paths. // There can be up to 3 bytes of padding. if (buf[path_size - 1] == '\0') --path_size; if (buf[path_size - 1] == '\0') --path_size; |