summary refs log tree commit diff
path: root/locale/nl_langinfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'locale/nl_langinfo.c')
-rw-r--r--locale/nl_langinfo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/locale/nl_langinfo.c b/locale/nl_langinfo.c
index 9b0b7c7e31..5347d79beb 100644
--- a/locale/nl_langinfo.c
+++ b/locale/nl_langinfo.c
@@ -33,7 +33,7 @@ nl_langinfo (item)
   unsigned int index = _NL_ITEM_INDEX (item);
   const struct locale_data *data;
 
-  if (category < 0 || category >= LC_ALL)
+  if (category < 0 || category == LC_ALL || category >= __LC_LAST)
     /* Bogus category: bogus item.  */
     return (char *) "";