about summary refs log tree commit diff
path: root/locale/loadlocale.c
diff options
context:
space:
mode:
Diffstat (limited to 'locale/loadlocale.c')
-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];