Index: delta_diff_generator.cc |
diff --git a/delta_diff_generator.cc b/delta_diff_generator.cc |
index 23c5fc8d8a3a1f975b2a289190c4d17a44be5746..ec071193cecc67a7112d616241e3739650c356fa 100644 |
--- a/delta_diff_generator.cc |
+++ b/delta_diff_generator.cc |
@@ -27,6 +27,7 @@ |
#include "update_engine/utils.h" |
using std::make_pair; |
+using std::max; |
using std::min; |
using std::set; |
using std::string; |
@@ -756,7 +757,7 @@ bool DeltaDiffGenerator::GenerateDeltaUpdateFile( |
TEST_AND_RETURN_FALSE(utils::FileSize(old_kernel_part) >= 0); |
TEST_AND_RETURN_FALSE(utils::FileSize(new_kernel_part) >= 0); |
- vector<Block> blocks(min(old_image_stbuf.st_size / kBlockSize, |
+ vector<Block> blocks(max(old_image_stbuf.st_size / kBlockSize, |
new_image_stbuf.st_size / kBlockSize)); |
LOG(INFO) << "invalid: " << Vertex::kInvalidIndex; |
LOG(INFO) << "len: " << blocks.size(); |