OSDN Git Service

PATCH: [ 1403893 ] Fix whitespace error in ByteCompare
authorPerry Rapp <elsapo@users.sourceforge.net>
Fri, 13 Jan 2006 17:49:54 +0000 (17:49 +0000)
committerPerry Rapp <elsapo@users.sourceforge.net>
Fri, 13 Jan 2006 17:49:54 +0000 (17:49 +0000)
 BUG: [ 1400779 ] Whitespace bug in ByteComparator
  Src: ByteComparator.cpp

Src/ByteComparator.cpp
Src/Changes.txt

index 968f484..312eb84 100644 (file)
@@ -58,7 +58,14 @@ ByteComparator::CompareBuffers(LPCSTR &ptr0, LPCSTR &ptr1, LPCSTR end0, LPCSTR e
                if (m_ignore_space_change)
                {
                        // Skip over any whitespace if on both sides
-                       if (m_wsflag || (!eof0 && !eof1 && iswsch(*ptr0) && iswsch(*ptr1)))
+                       
+                       if (ptr0 < end0 && ptr1 < end1 && iswsch(*ptr0) && iswsch(*ptr1))
+                       {
+                               m_wsflag = true;
+                               ++ptr0;
+                               ++ptr1;
+                       }
+                       if (m_wsflag)
                        {
                                // skip over consecutive whitespace
                                while (ptr0 < end0 && iswsch(*ptr0))
index d8ce3c7..99bfeeb 100644 (file)
@@ -2,6 +2,9 @@
  PATCH: [ 1403454 ] Add comment to UniStdioFile.h
  (Cosmetic)
   Src/Common: UniFile.h
+ PATCH: [ 1403893 ] Fix whitespace error in ByteCompare
+ BUG: [ 1400779 ] Whitespace bug in ByteComparator
+  Src: ByteComparator.cpp
 
 2006-01-13 Kimmo
  PATCH: [ 1039677 ] Alter text of Reset button label