OSDN Git Service

Patch #1865087 - This fix got lost somehow...
authorJochen Tucht <jtuc@users.sourceforge.net>
Thu, 31 Jan 2008 21:49:14 +0000 (21:49 +0000)
committerJochen Tucht <jtuc@users.sourceforge.net>
Thu, 31 Jan 2008 21:49:14 +0000 (21:49 +0000)
Src/CompareEngines/ByteCompare.cpp

index 6967689..2362459 100644 (file)
@@ -168,15 +168,10 @@ int ByteCompare::CompareFiles(FileLocation *location, BOOL guessEncoding)
                                        DiffFileData::GuessEncoding_from_buffer(location[i], buff[i], rtn);
                                if (m_inf[0].desc == m_inf[1].desc)
                                {
-                                       bfstart[1] = bfstart[0];
-                                       bfend[1] = bfend[0];
-                                       eof[1] = eof[0];
-                                       location[1] = location[0];
-                                       memcpy(&buff[1][bfend[1] - rtn], &buff[0][bfend[0] - rtn], rtn);
-                                       break;
+                                       location[1].encoding = location[0].encoding;
+                                       return diffcode;
                                }
                        }
-                       
                }
                guessEncoding = FALSE;
                // where to start comparing right now