8590a8b
diff --git a/src/pch.c b/src/pch.c
8590a8b
index e92bc64..a500ad9 100644
8590a8b
--- a/src/pch.c
8590a8b
+++ b/src/pch.c
8590a8b
@@ -2122,7 +2122,7 @@ pch_swap (void)
8590a8b
     }
8590a8b
     if (p_efake >= 0) {			/* fix non-freeable ptr range */
8590a8b
 	if (p_efake <= i)
8590a8b
-	    n = p_end - i + 1;
8590a8b
+	    n = p_end - p_ptrn_lines;
8590a8b
 	else
8590a8b
 	    n = -i;
8590a8b
 	p_efake += n;