From 2eff59667d3c590f27ee39cd0969b2221af739a0 Mon Sep 17 00:00:00 2001 From: Aaro Koskinen Date: Tue, 22 Nov 2016 00:19:50 +0200 Subject: 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 Signed-off-by: Denys Vlasenko --- editors/patch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'editors/patch.c') diff --git a/editors/patch.c b/editors/patch.c index 988021d77..4ee9339a7 100644 --- a/editors/patch.c +++ b/editors/patch.c @@ -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; -- cgit v1.2.3