summaryrefslogtreecommitdiffhomepage
path: root/editors
diff options
context:
space:
mode:
authorAaro Koskinen <aaro.koskinen@iki.fi>2016-11-22 00:19:50 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2016-11-24 11:38:56 +0100
commit2eff59667d3c590f27ee39cd0969b2221af739a0 (patch)
treeeffde9a154e1ba62f5e72bc5ec9fed822dc4ee90 /editors
parent5bbee27c0fcafe60f43a294afa1352b5ddcab6f3 (diff)
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>
Diffstat (limited to 'editors')
-rw-r--r--editors/patch.c2
1 files changed, 1 insertions, 1 deletions
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;