diff --git a/builtin-apply.c b/builtin-apply.c
index 7a1ff041f15cd4e6ce2a5b1d1e3cb668f2f54f5e..5b5bde4f39e9c438a108fa1be0d04c76a379b696 100644 (file)
--- a/builtin-apply.c
+++ b/builtin-apply.c
if (applied_pos >= 0) {
if (ws_error_action == correct_ws_error &&
new_blank_lines_at_end &&
- postimage.nr + applied_pos == img->nr) {
+ preimage.nr + applied_pos == img->nr) {
/*
* If the patch application adds blank lines
* at the end, and if the patch applies at the