about summary refs log tree commit diff
path: root/locale/programs
diff options
context:
space:
mode:
Diffstat (limited to 'locale/programs')
-rw-r--r--locale/programs/ld-paper.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/locale/programs/ld-paper.c b/locale/programs/ld-paper.c
index 776c780834..a3b54fd7d9 100644
--- a/locale/programs/ld-paper.c
+++ b/locale/programs/ld-paper.c
@@ -133,12 +133,12 @@ paper_output (struct localedef_t *locale, struct charmap_t *charmap,
   iov[cnt].iov_len = sizeof (idx);
   ++cnt;
 
-  idx[cnt - 2] = iov[0].iov_len + iov[1].iov_len;
+  idx[cnt - 2] = iov[cnt - 2].iov_len + iov[cnt - 1].iov_len;
   iov[cnt].iov_base = &paper->height;
   iov[cnt].iov_len = 4;
   ++cnt;
 
-  idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len;
+  idx[cnt - 2] = idx[cnt - 2] + iov[cnt - 1].iov_len;
   iov[cnt].iov_base = &paper->width;
   iov[cnt].iov_len = 4;
   ++cnt;