From: Ulrich Drepper Date: Fri, 30 Jan 1998 17:00:58 +0000 (+0000) Subject: (insert_char): Correctly insert value of eliipsis expression. X-Git-Tag: cvs/before-sparc-2_0_x-branch~264 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d53d10cc9dcdd4cbae43e3c7a2a86577530bc871;p=thirdparty%2Fglibc.git (insert_char): Correctly insert value of eliipsis expression. --- diff --git a/locale/programs/charset.c b/locale/programs/charset.c index a7f988d3a5b..18d8dcfec5e 100644 --- a/locale/programs/charset.c +++ b/locale/programs/charset.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1998 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, . @@ -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); } }