OSDN Git Service

BUG: [ 1414868 ] Bug in byte_compare (early finish)
authorPerry Rapp <elsapo@users.sourceforge.net>
Wed, 25 Jan 2006 19:11:53 +0000 (19:11 +0000)
committerPerry Rapp <elsapo@users.sourceforge.net>
Wed, 25 Jan 2006 19:11:53 +0000 (19:11 +0000)
  (Also added some comments.)
  Src: DiffWrapper.cpp

Src/Changes.txt
Src/DiffWrapper.cpp

index 28a9bbe..ae30a14 100644 (file)
@@ -1,7 +1,10 @@
 2006-01-25 Perry
  BUG: [ 1412237 ] InitOption return value wrong if RegCreateKey fails
   Fix unused wrong return value of InitOption & improve one comment
- Src/Common: OptionsMgr.cpp
+  Src/Common: OptionsMgr.cpp
+ BUG: [ 1414868 ] Bug in byte_compare (early finish)
+  (Also added some comments.)
+  Src: DiffWrapper.cpp
 
 2006-01-24 WinMerge experimental release 2.5.3.1 (cvs)
 
index f898b97..4185835 100644 (file)
@@ -1601,7 +1601,12 @@ int DiffFileData::byte_compare_files(BOOL bStopAfterFirstDiff, const IAbortable
        ByteComparator comparator(ignore_case_flag, ignore_space_change_flag
                , ignore_all_space_flag, ignore_eol_diff, ignore_blank_lines_flag);
 
-       while (!eof[0] && !eof[1])
+       // Begin loop
+       // we handle the files in WMCMPBUFF sized buffers (variable buff[][])
+       // That is, we do one buffer full at a time
+       // or even less, as we process until one side buffer is empty, then reload that one
+       // and continue
+       while (!eof[0] || !eof[1])
        {
                if (piAbortable && piAbortable->ShouldAbort())
                        return DIFFCODE::CMPABORT;