summaryrefslogtreecommitdiffstats
path: root/src/deps_log.cc
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2013-08-28 22:00:05 (GMT)
committerNico Weber <thakis@chromium.org>2013-08-28 22:00:05 (GMT)
commit65120c69372cd35809168115a9fc2a12868eb4aa (patch)
tree2f19421bf5374ad6acf21e393a3915c2935ca3cf /src/deps_log.cc
parentf92a6dfe168e4e4f2ed8592f9be1d176dc4e1179 (diff)
downloadNinja-65120c69372cd35809168115a9fc2a12868eb4aa.zip
Ninja-65120c69372cd35809168115a9fc2a12868eb4aa.tar.gz
Ninja-65120c69372cd35809168115a9fc2a12868eb4aa.tar.bz2
Fix an issue with more than 64k deps, spotted by maximuska.
Also add a test for this case, which would have spotted the issue too.
Diffstat (limited to 'src/deps_log.cc')
-rw-r--r--src/deps_log.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/deps_log.cc b/src/deps_log.cc
index 64ef58f..ceee68a 100644
--- a/src/deps_log.cc
+++ b/src/deps_log.cc
@@ -124,7 +124,7 @@ bool DepsLog::RecordDeps(Node* node, TimeStamp mtime,
return true;
// Update on-disk representation.
- unsigned size = 4 * (1 + 1 + (uint16_t)node_count);
+ unsigned size = 4 * (1 + 1 + node_count);
if (size > kMaxRecordSize) {
errno = ERANGE;
return false;