diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-07 11:53:09 +0000 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-07 11:53:09 +0000 |
commit | 746479a2d915d02f6f02ec508202afb1face7c2b (patch) | |
tree | 1d26867f949791b0e2ba99246aa252f02e693cef /repair.cc | |
parent | Adding debian version 1.18~pre1-1. (diff) | |
download | lziprecover-746479a2d915d02f6f02ec508202afb1face7c2b.tar.xz lziprecover-746479a2d915d02f6f02ec508202afb1face7c2b.zip |
Merging upstream version 1.18~pre2.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'repair.cc')
-rw-r--r-- | repair.cc | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -41,10 +41,9 @@ bool gross_damage( const long long msize, const uint8_t * const mbuffer ) enum { maxlen = 6 }; // max number of consecutive identical bytes long i = File_header::size; const long end = msize - File_trailer::size - maxlen; - uint8_t byte; while( i < end ) { - byte = mbuffer[i]; + const uint8_t byte = mbuffer[i]; int len = 0; // does not count the first byte while( mbuffer[++i] == byte && ++len < maxlen ) {} if( len >= maxlen ) return true; |