From: Piotr Caban piotr@codeweavers.com
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55287 --- dlls/ntdll/unix/env.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/ntdll/unix/env.c b/dlls/ntdll/unix/env.c index 3f00f6f68de..f2e715c2b31 100644 --- a/dlls/ntdll/unix/env.c +++ b/dlls/ntdll/unix/env.c @@ -1692,9 +1692,9 @@ static inline DWORD append_string( void **ptr, const RTL_USER_PROCESS_PARAMETERS }
#ifdef _WIN64 -static inline void dup_unicode_string( const UNICODE_STRING *src, WCHAR **dst, UNICODE_STRING32 *str ) +static inline void dup_unicode_string( const UNICODE_STRING *src, BYTE **dst, UNICODE_STRING32 *str ) #else -static inline void dup_unicode_string( const UNICODE_STRING *src, WCHAR **dst, UNICODE_STRING64 *str ) +static inline void dup_unicode_string( const UNICODE_STRING *src, BYTE **dst, UNICODE_STRING64 *str ) #endif { if (!src->Buffer) return; @@ -1702,7 +1702,7 @@ static inline void dup_unicode_string( const UNICODE_STRING *src, WCHAR **dst, U str->Length = src->Length; str->MaximumLength = src->MaximumLength; memcpy( *dst, src->Buffer, src->MaximumLength ); - *dst += src->MaximumLength / sizeof(WCHAR); + *dst += src->MaximumLength; }
@@ -1789,7 +1789,7 @@ static void *build_wow64_parameters( const RTL_USER_PROCESS_PARAMETERS *params ) RTL_USER_PROCESS_PARAMETERS64 *wow64_params = NULL; #endif NTSTATUS status; - WCHAR *dst; + BYTE *dst; SIZE_T size = (sizeof(*wow64_params) + params->CurrentDirectory.DosPath.MaximumLength + params->DllPath.MaximumLength @@ -1825,7 +1825,7 @@ static void *build_wow64_parameters( const RTL_USER_PROCESS_PARAMETERS *params ) wow64_params->wShowWindow = params->wShowWindow; wow64_params->ProcessGroupId = params->ProcessGroupId;
- dst = (WCHAR *)(wow64_params + 1); + dst = (BYTE *)(wow64_params + 1); dup_unicode_string( ¶ms->CurrentDirectory.DosPath, &dst, &wow64_params->CurrentDirectory.DosPath ); dup_unicode_string( ¶ms->DllPath, &dst, &wow64_params->DllPath ); dup_unicode_string( ¶ms->ImagePathName, &dst, &wow64_params->ImagePathName );