libroot: Fix initialization of LocaleNumericDataBridge.

We need to store the isGlobal value, so that the destructor
can take care of unsetting the glibc locale properly.

It seems this has been broken since d338200e2b.

Fixes #18344 and probably #18336.
This commit is contained in:
Augustin Cavalier 2023-04-25 15:55:42 -04:00
parent 419abdb265
commit 3c51bd6a2b

View File

@ -89,7 +89,8 @@ LocaleMonetaryDataBridge::LocaleMonetaryDataBridge()
LocaleNumericDataBridge::LocaleNumericDataBridge(bool isGlobal)
:
posixLocaleConv(&gPosixLocaleConv),
glibcNumericLocale(&glibcNumericLocaleData)
glibcNumericLocale(&glibcNumericLocaleData),
isGlobal(isGlobal)
{
memcpy(glibcNumericLocale, _NL_GLOBAL_DATA(GLIBC_LC_NUMERIC),