about summary refs log tree commit diff
path: root/locale
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-11-20 23:27:27 +0000
committerUlrich Drepper <drepper@redhat.com>1999-11-20 23:27:27 +0000
commitbece1bc4ec83cde611243c891d3a93b5e9bbcedd (patch)
treeffcd1354bb31a945e59c29ac7dff19d50e1bfb49 /locale
parent9e2b7438ecec43f3c6bd55326529bf06fc1aaeb8 (diff)
downloadglibc-bece1bc4ec83cde611243c891d3a93b5e9bbcedd.tar.gz
glibc-bece1bc4ec83cde611243c891d3a93b5e9bbcedd.tar.xz
glibc-bece1bc4ec83cde611243c891d3a93b5e9bbcedd.zip
Update.
	* wctype/wctrans.c (wctrans): Use correct base index to access
	extra mapping tables.

	* locale/loadlocale.c (_nl_load_locale): Use actual number of
	entries from file and not the fixed (minimal number from the
	langinfo.h list.
Diffstat (limited to 'locale')
-rw-r--r--locale/loadlocale.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/locale/loadlocale.c b/locale/loadlocale.c
index d829309f9f..7b94a42d0a 100644
--- a/locale/loadlocale.c
+++ b/locale/loadlocale.c
@@ -176,8 +176,7 @@ _nl_load_locale (struct loaded_l10nfile *file, int category)
     }
 
   newdata = malloc (sizeof *newdata
-		    + (_nl_category_num_items[category]
-		       * sizeof (union locale_data_value)));
+		    + filedata->nstrings * sizeof (union locale_data_value));
   if (! newdata)
     goto puntmap;
 
@@ -186,7 +185,7 @@ _nl_load_locale (struct loaded_l10nfile *file, int category)
   newdata->filesize = st.st_size;
   newdata->mmaped = mmaped;
   newdata->usage_count = 0;
-  newdata->nstrings = _nl_category_num_items[category];
+  newdata->nstrings = filedata->nstrings;
   for (cnt = 0; cnt < newdata->nstrings; ++cnt)
     {
       off_t idx = filedata->strindex[cnt];