aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2018-03-03 21:26:17 +0100
committerThomas White <taw@physics.org>2018-03-03 21:26:17 +0100
commit833acd406925d2f63420a81094b31d7252e6385d (patch)
tree00bc470a393a38ceb7dc47a350a5c6126ee156ed /src
parentb8dd2901f9e205f330fca47cbd3984270b5d60b1 (diff)
delete_run: Stop moving too many runs
Diffstat (limited to 'src')
-rw-r--r--src/frame.c2
1 files changed, 1 insertions, 1 deletions
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(&para->runs[nrun], &para->runs[nrun+1],
- (para->n_runs-1)*sizeof(struct text_run));
+ (para->n_runs-nrun-1)*sizeof(struct text_run));
para->n_runs--;
}