LC_MEASUREMENT locale bug

Andreas Schwab schwab@suse.de
Thu Dec 19 16:27:00 GMT 2002


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;



More information about the Libc-hacker mailing list