Skip to content
Snippets Groups Projects
Commit 2344d47f authored by Johannes Schindelin's avatar Johannes Schindelin Committed by Junio C Hamano
Browse files

diff: fix 2 whitespace issues


When whitespace or whitespace change was ignored, the function
xdl_recmatch() returned memcmp() style differences, which is wrong,
since it should return 0 on non-match.

Also, there were three horrible off-by-one bugs, even leading to wrong
hashes in the whitespace special handling.

The issue was noticed by Ray Lehtiniemi.

For good measure, this commit adds a test.

Signed-off-by: default avatarJohannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: default avatarJunio C Hamano <junkio@cox.net>
parent 854de5a5
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment