Skip to content

Commit

Permalink
Fixed an issue where Differences, Left/Right EOL columns, etc. were d…
Browse files Browse the repository at this point in the history
…isplayed as undefined values when the file comparison method was Full Contents or Quick Contents and the file size exceeded 64MB.
  • Loading branch information
sdottaka committed Sep 6, 2023
1 parent 50f3edb commit 771c0ed
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions Src/FolderCmp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,15 @@ int FolderCmp::prepAndCompareFiles(DIFFITEM &di)

if (nCompMethod == CMP_CONTENT || nCompMethod == CMP_QUICK_CONTENT)
{
// Reset text stats
for (nIndex = 0; nIndex < nDirs; nIndex++)
{
m_diffFileData.m_textStats[nIndex].clear();
m_diffFileData.m_FileLocation[nIndex].encoding.Clear();
}
m_ndiffs = CDiffContext::DIFFS_UNKNOWN;
m_ntrivialdiffs = CDiffContext::DIFFS_UNKNOWN;

if ((di.diffFileInfo[0].size > m_pCtxt->m_nBinaryCompareLimit && di.diffFileInfo[0].size != DirItem::FILE_SIZE_NONE) ||
(di.diffFileInfo[1].size > m_pCtxt->m_nBinaryCompareLimit && di.diffFileInfo[1].size != DirItem::FILE_SIZE_NONE) ||
(nDirs > 2 && di.diffFileInfo[2].size > m_pCtxt->m_nBinaryCompareLimit && di.diffFileInfo[2].size != DirItem::FILE_SIZE_NONE))
Expand All @@ -92,11 +101,6 @@ int FolderCmp::prepAndCompareFiles(DIFFITEM &di)
if (nCompMethod == CMP_CONTENT ||
nCompMethod == CMP_QUICK_CONTENT)
{

// Reset text stats
for (nIndex = 0; nIndex < nDirs; nIndex++)
m_diffFileData.m_textStats[nIndex].clear();

PathContext tFiles;
m_pCtxt->GetComparePaths(di, tFiles);
struct change *script10 = nullptr;
Expand Down

0 comments on commit 771c0ed

Please sign in to comment.