From: Ulrich Drepper Date: Thu, 24 Feb 2000 05:50:20 +0000 (+0000) Subject: (ctype_output): Write out the entire width array. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd6ad67405b99eac3f46f549237865891ad3af0c;p=thirdparty%2Fglibc.git (ctype_output): Write out the entire width array. --- diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c index 2d63c2c31eb..6a01844c9c5 100644 --- a/locale/programs/ld-ctype.c +++ b/locale/programs/ld-ctype.c @@ -593,7 +593,8 @@ ctype_output (struct localedef_t *locale, struct charset_t *charset, break; CTYPE_DATA (_NL_CTYPE_WIDTH, - ctype->width, ctype->plane_size * ctype->plane_cnt); + ctype->width, + (ctype->plane_size * ctype->plane_cnt + 3) ~3ul); CTYPE_DATA (_NL_CTYPE_MB_CUR_MAX, &ctype->mb_cur_max, sizeof (u_int32_t)); @@ -1641,8 +1642,7 @@ Computing table size for character classes might take a while..."), ctype->width = (unsigned char *) xmalloc (width_table_size); /* Initialize with default width value. */ - memset (ctype->width, charset->width_default, - ctype->plane_size * ctype->plane_cnt); + memset (ctype->width, charset->width_default, width_table_size); if (charset->width_rules != NULL) { size_t cnt;