diff options
-rw-r--r-- | bsdiff.cc | 2 | ||||
-rw-r--r-- | patch_writer.cc | 5 |
2 files changed, 2 insertions, 5 deletions
@@ -119,7 +119,7 @@ int bsdiff(const uint8_t* old_buf, size_t oldsize, const uint8_t* new_buf, oldscore++; if(((len==oldscore) && (len!=0)) || - (len>oldscore+8 && len>=min_length)) break; + (len>=oldscore+8 && len>=min_length)) break; if((scan+lastoffset<oldsize) && (old_buf[scan+lastoffset] == new_buf[scan])) diff --git a/patch_writer.cc b/patch_writer.cc index b7d9b08..83bc531 100644 --- a/patch_writer.cc +++ b/patch_writer.cc @@ -13,10 +13,6 @@ #include "bsdiff/control_entry.h" #include "bsdiff/logging.h" -namespace { - - -} // namespace namespace bsdiff { @@ -43,6 +39,7 @@ bool BsdiffPatchWriter::InitializeCompressorList( LOG(ERROR) << "Patch writer expects at least one compressor."; return false; } + compressor_list->clear(); for (const auto& type : types_) { switch (type) { |