Commit Diff


commit - e6435d8f03f5310b07425d7d0acee7f0b8f52d8c
commit + bdfcb0869a9b731044cf3b1acc797a805dd8eed9
blob - ed69c313f4ddb604d3cc46607cc371e59bdbc9ed
blob + ba3fc3a79d5bde17c260332055d36a284a34cb76
--- lib/diff_atomize_text.c
+++ lib/diff_atomize_text.c
@@ -131,8 +131,8 @@ diff_data_atomize_text_lines_mmap(struct diff_data *d)
 		if (line_end < end)
 			line_end++;
 		/* If that was an '\r', also pull in any following '\n' */
-		if (line_end[0] == '\r'
-		    && line_end < end && line_end[1] == '\n')
+		if (line_end < end && line_end[0] == '\r' &&
+		    line_end[1] == '\n')
 			line_end++;
 
 		/* Record the found line as diff atom */