From b0ab8b3913bffb3ff883a441a4ea338afcc2138e Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Tue, 16 Dec 2014 04:12:24 +0100 Subject: [PATCH] Added patch to return proper charcount for GetLocaleInfo with LOCALE_IFIRSTDAYOFWEEK. --- README.md | 3 ++- debian/changelog | 1 + patches/Makefile | 16 +++++++++++ ...proper-char-count-in-get_registry_lo.patch | 27 +++++++++++++++++++ .../definition | 1 + 5 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 patches/kernel32-get_registry_locale_info/0001-kernel32-Return-proper-char-count-in-get_registry_lo.patch create mode 100644 patches/kernel32-get_registry_locale_info/definition diff --git a/README.md b/README.md index 8e1af029..6f43f7fc 100644 --- a/README.md +++ b/README.md @@ -37,9 +37,10 @@ Wine. All those differences are also documented on the Included bug fixes and improvements =================================== -**Bugfixes and features included in the next upcoming release [1]:** +**Bugfixes and features included in the next upcoming release [2]:** * Fix handling of subdirectory in FtpFindFirstFile ([Wine Bug #16526](https://bugs.winehq.org/show_bug.cgi?id=16526)) +* Return proper charcount for GetLocaleInfo with LOCALE_IFIRSTDAYOFWEEK ([Wine Bug #32169](https://bugs.winehq.org/show_bug.cgi?id=32169)) **Bugs fixed in Wine Staging 1.7.33 [119]:** diff --git a/debian/changelog b/debian/changelog index 761fb1ef..c886fc08 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ wine-compholio (1.7.34) UNRELEASED; urgency=low * Fix issue in DOS Attributes patch which broke ./configure on systems with alternative shells. * Added patch to fix handling of subdirectory in FtpFindFirstFile. + * Added patch to return proper charcount for GetLocaleInfo with LOCALE_IFIRSTDAYOFWEEK. * Removed patch to implement combase HSTRING objects (accepted upstream). * Removed patch to add fake ProductId to registry (accepted upstream). -- Sebastian Lackner Mon, 15 Dec 2014 22:42:09 +0100 diff --git a/patches/Makefile b/patches/Makefile index 4196a89e..76367a49 100644 --- a/patches/Makefile +++ b/patches/Makefile @@ -53,6 +53,7 @@ PATCHLIST := \ kernel32-Profile.ok \ kernel32-UTF7_Support.ok \ kernel32-VerifyVersionInfo.ok \ + kernel32-get_registry_locale_info.ok \ libs-Unicode_Collation.ok \ libwine-BSD_mmap_fixed.ok \ mfplat-Stubs.ok \ @@ -740,6 +741,21 @@ kernel32-VerifyVersionInfo.ok: echo '+ { "Sebastian Lackner", "ntdll: Fix condition mask handling in RtlVerifyVersionInfo.", 1 },'; \ ) > kernel32-VerifyVersionInfo.ok +# Patchset kernel32-get_registry_locale_info +# | +# | This patchset fixes the following Wine bugs: +# | * [#32169] Return proper charcount for GetLocaleInfo with LOCALE_IFIRSTDAYOFWEEK +# | +# | Modified files: +# | * dlls/kernel32/locale.c +# | +.INTERMEDIATE: kernel32-get_registry_locale_info.ok +kernel32-get_registry_locale_info.ok: + $(call APPLY_FILE,kernel32-get_registry_locale_info/0001-kernel32-Return-proper-char-count-in-get_registry_lo.patch) + @( \ + echo '+ { "Sebastian Lackner", "kernel32: Return proper char count in get_registry_locale_info.", 1 },'; \ + ) > kernel32-get_registry_locale_info.ok + # Patchset libs-Unicode_Collation # | # | This patchset fixes the following Wine bugs: diff --git a/patches/kernel32-get_registry_locale_info/0001-kernel32-Return-proper-char-count-in-get_registry_lo.patch b/patches/kernel32-get_registry_locale_info/0001-kernel32-Return-proper-char-count-in-get_registry_lo.patch new file mode 100644 index 00000000..b76ee18a --- /dev/null +++ b/patches/kernel32-get_registry_locale_info/0001-kernel32-Return-proper-char-count-in-get_registry_lo.patch @@ -0,0 +1,27 @@ +From 0dc9223ea631649d09fb6e94c4c01032150c155c Mon Sep 17 00:00:00 2001 +From: Sebastian Lackner +Date: Tue, 16 Dec 2014 04:10:34 +0100 +Subject: kernel32: Return proper char count in get_registry_locale_info. + +--- + dlls/kernel32/locale.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/dlls/kernel32/locale.c b/dlls/kernel32/locale.c +index 5fee723..1460f7a 100644 +--- a/dlls/kernel32/locale.c ++++ b/dlls/kernel32/locale.c +@@ -1206,7 +1206,9 @@ static INT get_registry_locale_info( struct registry_value *registry_value, LPWS + { + if (status == STATUS_BUFFER_OVERFLOW && !buffer) + { +- ret = (size - info_size) / sizeof(WCHAR) + 1; ++ ret = (size - info_size) / sizeof(WCHAR); ++ if (!ret || ((WCHAR *)&info->Data)[ret-1]) ++ ret++; + } + else if (status == STATUS_OBJECT_NAME_NOT_FOUND) + { +-- +2.1.3 + diff --git a/patches/kernel32-get_registry_locale_info/definition b/patches/kernel32-get_registry_locale_info/definition new file mode 100644 index 00000000..0ca7890a --- /dev/null +++ b/patches/kernel32-get_registry_locale_info/definition @@ -0,0 +1 @@ +Fixes: [32169] Return proper charcount for GetLocaleInfo with LOCALE_IFIRSTDAYOFWEEK