summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2013-04-27 21:37:26 (GMT)
committerEvan Martin <martine@danga.com>2013-04-27 21:37:26 (GMT)
commit3699cb6aa2fb29125bf725cb50fbcc593da8a8a1 (patch)
treeb896b4a7a8871bcd9a365b5bdff485eeda7457dc
parentf4226200f27e26dfef8cc9f8bc8c6e179d285edd (diff)
downloadNinja-3699cb6aa2fb29125bf725cb50fbcc593da8a8a1.zip
Ninja-3699cb6aa2fb29125bf725cb50fbcc593da8a8a1.tar.gz
Ninja-3699cb6aa2fb29125bf725cb50fbcc593da8a8a1.tar.bz2
don't count eof as truncated
-rw-r--r--src/deps_log.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/deps_log.cc b/src/deps_log.cc
index eb1ea2b..c52503b 100644
--- a/src/deps_log.cc
+++ b/src/deps_log.cc
@@ -159,7 +159,8 @@ bool DepsLog::Load(const string& path, State* state, string* err) {
uint16_t size;
if (fread(&size, 2, 1, f) < 1) {
- read_failed = true;
+ if (!feof(f))
+ read_failed = true;
break;
}
bool is_deps = (size >> 15) != 0;