Bernhard Übelacker : ntdll: Allow 16-bit executables to be loaded from build directory.
Alexandre Julliard
julliard at winehq.org
Tue Jun 29 15:58:26 CDT 2021
Module: wine
Branch: master
Commit: cbf7a101763790ca03307c72d32dd8969a381be6
URL: https://source.winehq.org/git/wine.git/?a=commit;h=cbf7a101763790ca03307c72d32dd8969a381be6
Author: Bernhard Übelacker <bernhardu at mailbox.org>
Date: Mon Jun 28 10:39:58 2021 +0200
ntdll: Allow 16-bit executables to be loaded from build directory.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51214
Signed-off-by: Bernhard Übelacker <bernhardu at mailbox.org>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntdll/loader.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 14cc105b64d..cfec779dd59 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -2675,6 +2675,7 @@ static NTSTATUS find_builtin_without_file( const WCHAR *name, UNICODE_STRING *ne
if (!get_env_var( L"WINEBUILDDIR", 20 + 2 * wcslen(name), new_name ))
{
+ len = new_name->Length;
RtlAppendUnicodeToString( new_name, L"\\dlls\\" );
RtlAppendUnicodeToString( new_name, name );
if ((ext = wcsrchr( name, '.' )) && !wcscmp( ext, L".dll" )) new_name->Length -= 4 * sizeof(WCHAR);
@@ -2685,6 +2686,17 @@ static NTSTATUS find_builtin_without_file( const WCHAR *name, UNICODE_STRING *ne
RtlAppendUnicodeToString( new_name, L".fake" );
status = open_dll_file( new_name, pwm, mapping, image_info, id );
if (status != STATUS_DLL_NOT_FOUND) goto done;
+
+ new_name->Length = len;
+ RtlAppendUnicodeToString( new_name, L"\\programs\\" );
+ RtlAppendUnicodeToString( new_name, name );
+ RtlAppendUnicodeToString( new_name, L"\\" );
+ RtlAppendUnicodeToString( new_name, name );
+ status = open_dll_file( new_name, pwm, mapping, image_info, id );
+ if (status != STATUS_DLL_NOT_FOUND) goto done;
+ RtlAppendUnicodeToString( new_name, L".fake" );
+ status = open_dll_file( new_name, pwm, mapping, image_info, id );
+ if (status != STATUS_DLL_NOT_FOUND) goto done;
RtlFreeUnicodeString( new_name );
}
More information about the wine-cvs
mailing list