mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 04:22:34 +03:00
Ticket #4608: mcdiff: segmentation fault on empty files merge.
(get_current_hunk): immediately return if hunk list is empty. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
f85f7fec29
commit
8548796e75
@ -1926,6 +1926,10 @@ get_current_hunk (WDiff *dview, int *start_line1, int *end_line1, int *start_lin
|
||||
int ch;
|
||||
int res = 0;
|
||||
|
||||
/* Is file empty? */
|
||||
if (a0->len == 0)
|
||||
return 0;
|
||||
|
||||
*start_line1 = 1;
|
||||
*start_line2 = 1;
|
||||
*end_line1 = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user