From 4d8698c3009df346bf46c292ee808f12ba24c6e3 Mon Sep 17 00:00:00 2001 From: Jessica Hamilton Date: Thu, 20 Apr 2023 04:45:42 +0000 Subject: [PATCH] duplocale: fix missing locale magic when creating a new locale. Fixes #18345. Change-Id: Ibedfa973b371b65a502dc655eae65f4ed0833144 --- src/system/libroot/posix/locale/locale_t.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/system/libroot/posix/locale/locale_t.cpp b/src/system/libroot/posix/locale/locale_t.cpp index 478150223d..343b9fd67b 100644 --- a/src/system/libroot/posix/locale/locale_t.cpp +++ b/src/system/libroot/posix/locale/locale_t.cpp @@ -81,6 +81,8 @@ duplocale(locale_t l) newBackend->SetLocale(lc, backend->SetLocale(lc, NULL)); } + newObj->magic = LOCALE_T_MAGIC; + return (locale_t)newObj; }