From e1a96291e1d5f4ec8e358f2a91d34c6019989594 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Sun, 10 Mar 2019 15:49:52 +0100 Subject: Fix text deletion in last paragraph --- libstorycode/narrative.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libstorycode/narrative.c b/libstorycode/narrative.c index fe1cf0c..caf9bc9 100644 --- a/libstorycode/narrative.c +++ b/libstorycode/narrative.c @@ -191,7 +191,8 @@ void narrative_delete_block(Narrative *n, int i1, size_t o1, int i2, size_t o2) merge = 0; } else { memmove(&n->items[i2].text[0], - &n->items[i2].text[o2], o2); + &n->items[i2].text[o2], + strlen(&n->items[i2].text[o2])+1); } /* If the start and end points are in different paragraphs, and both -- cgit v1.2.3