]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(ctype_output): Write out the entire width array.
authorUlrich Drepper <drepper@redhat.com>
Thu, 24 Feb 2000 05:50:20 +0000 (05:50 +0000)
committerUlrich Drepper <drepper@redhat.com>
Thu, 24 Feb 2000 05:50:20 +0000 (05:50 +0000)
locale/programs/ld-ctype.c

index 2d63c2c31eb32414da1f324f11ae4299e856d0db..6a01844c9c59dea51813bbd3e80034e0122d9ebf 100644 (file)
@@ -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;