diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2024-08-22 21:15:44 +0200 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2024-08-22 21:15:44 +0200 |
commit | ea1a458d20d6493f808cf4146dee106e5376ec99 (patch) | |
tree | 065a768917d66192cfea627840d71f6e3d6c61f1 | |
parent | 820dd5009b1b83788bf278912359af3a8e9239ad (diff) | |
download | newlib-ea1a458d20d6493f808cf4146dee106e5376ec99.zip newlib-ea1a458d20d6493f808cf4146dee106e5376ec99.tar.gz newlib-ea1a458d20d6493f808cf4146dee106e5376ec99.tar.bz2 |
nl_langinfo_l: drop erroneus messages::codeset entry
The nl_ext array contains offsets into the extended info of
locale structures, the index being equivalent to the nl_item
values in langinfo.h.
For the lc_messages_T struct, nl_ext erroneusly contains an
entry for the codeset member, which is in fact not part of the
extended info in nl_item. However, due to that, the offsets for
subsequent entries are off by one.
Fix this by dropping the messages::codeset entry from nl_ext.
Fixes: d47d5b850bed ("Extend locale support to maintain wide char values of native strings")
Reported-by: Brian Inglis <Brian.Inglis@systematicsw.ab.ca>
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
-rw-r--r-- | newlib/libc/locale/nl_langinfo.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/newlib/libc/locale/nl_langinfo.c b/newlib/libc/locale/nl_langinfo.c index c34a7d1..4477d83 100644 --- a/newlib/libc/locale/nl_langinfo.c +++ b/newlib/libc/locale/nl_langinfo.c @@ -160,7 +160,6 @@ static struct _nl_item_t _NLITEM (monetary, wmon_thousands_sep), _NLITEM (monetary, wpositive_sign), _NLITEM (monetary, wnegative_sign), - _NLITEM (messages, codeset), _NLITEM (messages, wyesexpr), _NLITEM (messages, wnoexpr), _NLITEM (messages, wyesstr), |