From 833acd406925d2f63420a81094b31d7252e6385d Mon Sep 17 00:00:00 2001 From: Thomas White Date: Sat, 3 Mar 2018 21:26:17 +0100 Subject: delete_run: Stop moving too many runs --- src/frame.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/frame.c') diff --git a/src/frame.c b/src/frame.c index b9cd990..96e0d37 100644 --- a/src/frame.c +++ b/src/frame.c @@ -1146,7 +1146,7 @@ static void delete_run(Paragraph *para, int nrun) { printf("deleting run %i of %i from para %p\n", nrun, para->n_runs, para); memmove(¶->runs[nrun], ¶->runs[nrun+1], - (para->n_runs-1)*sizeof(struct text_run)); + (para->n_runs-nrun-1)*sizeof(struct text_run)); para->n_runs--; } -- cgit v1.2.3