OSDN Git Service

BUG: [ 1449947 ] Looks like diffutils bug for mac-style
authorPerry Rapp <elsapo@users.sourceforge.net>
Wed, 15 Mar 2006 17:59:01 +0000 (17:59 +0000)
committerPerry Rapp <elsapo@users.sourceforge.net>
Wed, 15 Mar 2006 17:59:01 +0000 (17:59 +0000)
 BUG: [ 1449949 ] crash comparing two simple test mac files
 Fix looping which missed mac case
  diffutils\src: IO.C

Src/Changes.txt
Src/diffutils/src/IO.C

index ee550a8..e36bbbb 100644 (file)
@@ -2,6 +2,12 @@ Src\Changes.txt
 Add new items to top.
 (This summarizes all changes to all files under Src, including Src\Languages.)
 
+2006-03-14 Perry
+ BUG: [ 1449947 ] Looks like diffutils bug for mac-style
+ BUG: [ 1449949 ] crash comparing two simple test mac files
+ Fix looping which missed mac case
+  diffutils\src: IO.C
+
 2006-03-15 Kimmo
  PATCH: [ 1449868 ] Fix difference counts
   Src: DiffWrapper.cpp
index 0318f14..59be820 100644 (file)
@@ -281,7 +281,7 @@ find_and_hash_each_line (current)
              }
          else if (ignore_space_change_flag)
            /* Note that \r must be hashed (if !ignore_eol_diff) */
-           while ((c = *p++) != '\n')
+           while ((c = *p++) != '\n' && (c != '\r' || *p == '\n'))
              {
                if (ignore_eol_diff && (c=='\r' || c=='\n'))
                  continue;
@@ -342,7 +342,7 @@ find_and_hash_each_line (current)
              }
          else if (ignore_space_change_flag)
            /* Note that \r must be hashed (if !ignore_eol_diff) */
-           while ((c = *p++) != '\n')
+           while ((c = *p++) != '\n' && (c != '\r' || *p == '\n'))
              {
                if (ignore_eol_diff && (c=='\r' || c=='\n'))
                  continue;