This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

LC_MEASUREMENT locale bug


measurement-codeset doesn't get the correct offset in the locale file.

Andreas.

2002-12-20  Andreas Schwab  <schwab@suse.de>

	* locale/programs/ld-measurement.c (measurement_output): Fix
	index calculation.

--- locale/programs/ld-measurement.c.~1.12.~	2002-04-18 10:12:04.000000000 +0200
+++ locale/programs/ld-measurement.c	2002-12-20 01:07:54.000000000 +0100
@@ -143,7 +143,7 @@ measurement_output (struct localedef_t *
   iov[cnt].iov_len = 1;
   ++cnt;
 
-  idx[cnt - 2] = iov[0].iov_len + iov[1].iov_len;
+  idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len;
   iov[cnt].iov_base = (void *) charmap->code_set_name;
   iov[cnt].iov_len = strlen (iov[cnt].iov_base) + 1;
   ++cnt;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]