diff options
Diffstat (limited to 'locale/programs/charset.c')
-rw-r--r-- | locale/programs/charset.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/locale/programs/charset.c b/locale/programs/charset.c index 00233abf8f..fdacf25328 100644 --- a/locale/programs/charset.c +++ b/locale/programs/charset.c @@ -125,10 +125,11 @@ insert_char (struct linereader *lr, struct charset_t *cs, int bytes, for (cnt = from_nr; cnt <= to_nr; ++cnt) { - sprintf (&buf[prefix_len], "%0d", cnt); + sprintf (&buf[prefix_len], "%0*d", len1 - prefix_len, cnt); if (insert_entry (&cs->char_table, buf, len1, - (void *) (unsigned long int) cnt) < 0) + (void *) (unsigned long int) (value + (cnt - from_nr))) + < 0) lr_error (lr, _("duplicate character name `%s'"), buf); } } |