Skip to content

Commit

Permalink
Improve line filters and substitution filters (#2032) (3)
Browse files Browse the repository at this point in the history
  • Loading branch information
sdottaka committed Oct 1, 2023
1 parent 30a29cb commit 3e038d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Src/DiffWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ static std::tuple<std::string, unsigned, std::vector<bool>> GetCommentsFilteredT
{
unsigned blocklen = (j < nActualItems - 1) ? (blocks[j + 1].m_nCharPos - block.m_nCharPos) : textlen - block.m_nCharPos;
filteredT.append(text.c_str() + block.m_nCharPos, blocklen);
tchar_t c = filteredT.empty() ? 0 : filteredT.back();
tchar_t c = (blocklen == 0) ? 0 : *(text.c_str() + block.m_nCharPos);
if (c != '\r' && c != '\n')
allTextIsComment[i - startLine] = false;
}
Expand Down

0 comments on commit 3e038d7

Please sign in to comment.