[PATCH 2/4] ed: if only one address is given to j, do nothing.

From: Thomas Mannay <audiobarrier_AT_openmailbox.org>
Date: Thu, 6 Oct 2016 10:49:11 +0000

---
 ed.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/ed.c b/ed.c
index 2a1c0ba..651ed4e 100644
--- a/ed.c
+++ b/ed.c
_AT_@ -1175,9 +1175,8 @@ repeat:
 	case 'j':
 		chkprint(1);
 		deflines(curln, curln+1);
-		if (!line1)
-			goto bad_address;
-		join();
+		if (line1 != line2)
+			join();
 		break;
 	case 'z':
 		if (nlines > 1)
-- 
2.10.0
--Multipart=_Thu__6_Oct_2016_11_04_17_+0000_25tL/22NlhexcG.a
Content-Type: text/x-patch;
 name="0003-ed-fix-double-free-and-infinite-loop-in-join.patch"
Content-Disposition: attachment;
 filename="0003-ed-fix-double-free-and-infinite-loop-in-join.patch"
Content-Transfer-Encoding: 7bit
Received on Mon Sep 17 2001 - 00:00:00 CEST

This archive was generated by hypermail 2.3.0 : Thu Oct 06 2016 - 21:12:13 CEST