libc/locale: fix an off-by-one in newlocale
Reported by: zrj@DragonFlyBSD.org
This commit is contained in:
parent
96287fcda8
commit
5a51239a71
@ -275,7 +275,7 @@ locale_t newlocale(int mask, const char *locale, locale_t base)
|
||||
for (type=0 ; type<XLC_LAST ; type++) {
|
||||
if (mask & 1) {
|
||||
if (useenv) {
|
||||
realLocale = __get_locale_env(type);
|
||||
realLocale = __get_locale_env(type + 1);
|
||||
}
|
||||
new->components[type] =
|
||||
constructors[type](realLocale, new);
|
||||
|
Loading…
Reference in New Issue
Block a user