From f838190b502e43a47d498e8d9e388d05abdbfc19 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Mon, 15 Nov 2004 14:38:37 +0000 Subject: [PATCH] NtSetDefaultLocale must only store the lanuage id (lower half) of the given system locale id. svn path=/trunk/; revision=11666 --- reactos/ntoskrnl/ps/locale.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/reactos/ntoskrnl/ps/locale.c b/reactos/ntoskrnl/ps/locale.c index 93366d072ed..993fcf5e82a 100644 --- a/reactos/ntoskrnl/ps/locale.c +++ b/reactos/ntoskrnl/ps/locale.c @@ -1,4 +1,4 @@ -/* $Id: locale.c,v 1.12 2004/10/24 20:37:27 weiden Exp $ +/* $Id: locale.c,v 1.13 2004/11/15 14:38:37 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -292,9 +292,18 @@ NtSetDefaultLocale(IN BOOLEAN UserProfile, return(Status); } - ValueLength = swprintf(ValueBuffer, - L"%08lx", - (ULONG)DefaultLocaleId); + if (UserProfile) + { + ValueLength = swprintf(ValueBuffer, + L"%08lx", + (ULONG)DefaultLocaleId); + } + else + { + ValueLength = swprintf(ValueBuffer, + L"%04lx", + (ULONG)DefaultLocaleId & 0xFFFF); + } ValueLength = (ValueLength + 1) * sizeof(WCHAR); Status = NtSetValueKey(KeyHandle,