patch: fix debug log failure
If we reach the end of plist it means the input has still data while we are expecting EOF. Fix the log to avoid a crash. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
5bbee27c0f
commit
2eff59667d
@ -295,7 +295,7 @@ static int apply_one_hunk(void)
|
||||
// recheck remaining buffered data for a new match.
|
||||
|
||||
if (PATCH_DEBUG)
|
||||
fdprintf(2, "NOT: %s\n", plist->data);
|
||||
fdprintf(2, "NOT: %s\n", plist ? plist->data : "EOF");
|
||||
|
||||
TT.state = 3;
|
||||
check = buf;
|
||||
|
Loading…
Reference in New Issue
Block a user