diff options
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; |