Commit cbf7a101 authored by Bernhard Übelacker's avatar Bernhard Übelacker Committed by Alexandre Julliard

ntdll: Allow 16-bit executables to be loaded from build directory.

parent be55038f
......@@ -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 );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment