about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/locale/duplocale.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/locale/duplocale.c b/src/locale/duplocale.c
index 13368707..b87c933e 100644
--- a/src/locale/duplocale.c
+++ b/src/locale/duplocale.c
@@ -14,7 +14,8 @@ locale_t __duplocale(locale_t old)
 	if (old->messages_name)
 		strcpy(new->messages_name, old->messages_name);
 
-	if (new && old != LC_GLOBAL_LOCALE) memcpy(new, old, sizeof *new);
+	for (size_t i=0; i<sizeof new->cat/sizeof new->cat[0]; i++)
+		new->cat[i] = old->cat[i];
 	return new;
 }