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