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 d338200e2b7c03c7aa392598b8612d4e9afa1841.
Fixes #18344 and probably #18336.
Change-Id: Idb9b33cd1416969e01b73012de059ff051b76e74
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6373
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Diff
src/system/libroot/posix/locale/LocaleDataBridge.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
@@ -89,7 +89,8 @@
LocaleNumericDataBridge::LocaleNumericDataBridge(bool isGlobal)
:
posixLocaleConv(&gPosixLocaleConv),
glibcNumericLocale(&glibcNumericLocaleData)
glibcNumericLocale(&glibcNumericLocaleData),
isGlobal(isGlobal)
{
memcpy(glibcNumericLocale, _NL_GLOBAL_DATA(GLIBC_LC_NUMERIC),