diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-08 04:29:58 +0000 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-08 04:29:58 +0000 |
commit | 4646c2987eba0ba70050daf3c9fb450510a30237 (patch) | |
tree | b1312f8c64fd61a3097b553507d00cac44b3c4bd /zcmp.cc | |
parent | Adding debian version 1.1-1. (diff) | |
download | zutils-4646c2987eba0ba70050daf3c9fb450510a30237.tar.xz zutils-4646c2987eba0ba70050daf3c9fb450510a30237.zip |
Merging upstream version 1.2~pre2.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to '')
-rw-r--r-- | zcmp.cc | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -246,12 +246,12 @@ int cmp( const long long max_size, const int infd[2], } } - buffer0[rd[0]] = ~buffer1[rd[0]]; // sentinels for the block compare - buffer1[rd[1]] = ~buffer0[rd[1]]; + const int min_rd = std::min( rd[0], rd[1] ); + buffer0[min_rd] = 0; // sentinels for the block compare + buffer1[min_rd] = 1; int first_diff = block_compare( buffer0, buffer1, &line_number ); byte_number += first_diff; - const int min_rd = std::min( rd[0], rd[1] ); if( first_diff < min_rd ) { |