diff options
author | Thomas White <taw@bitwiz.me.uk> | 2019-03-10 15:49:52 +0100 |
---|---|---|
committer | Thomas White <taw@bitwiz.me.uk> | 2019-03-10 15:49:52 +0100 |
commit | e1a96291e1d5f4ec8e358f2a91d34c6019989594 (patch) | |
tree | 4d257a8e70086f67e08b50c25c1721c10c988adb | |
parent | 1d0df409c6d00dec67f3ec60674219bce30592a0 (diff) |
Fix text deletion in last paragraph
-rw-r--r-- | libstorycode/narrative.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 |