From 270c21387d57a67c397397d3246ca64031081bd6 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 7 Oct 1994 17:40:50 +0000 Subject: [PATCH] (make_gap): Keep input blocked till after we set BEG_ADDR. --- src/insdel.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/insdel.c b/src/insdel.c index 969f70dba6e..833d0065a1b 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -271,11 +271,16 @@ make_gap (increment) BLOCK_INPUT; result = BUFFER_REALLOC (BEG_ADDR, (Z - BEG + GAP_SIZE + increment)); - UNBLOCK_INPUT; if (result == 0) - memory_full (); + { + UNBLOCK_INPUT; + memory_full (); + } + + /* We can't unblock until the new address is properly stored. */ BEG_ADDR = result; + UNBLOCK_INPUT; /* Prevent quitting in move_gap. */ tem = Vinhibit_quit; -- 2.39.5