ntdll: Take into account ordinal base when resolving forwarded ordinals.

Signed-off-by: Mark Harmstone <mark@harmstone.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Mark Harmstone 2021-03-24 01:18:59 +00:00 committed by Alexandre Julliard
parent f69c8f0181
commit 3fd9a423d4
1 changed files with 5 additions and 3 deletions

View File

@ -642,9 +642,11 @@ static FARPROC find_forwarded_export( HMODULE module, const char *forward, LPCWS
IMAGE_DIRECTORY_ENTRY_EXPORT, &exp_size ))) IMAGE_DIRECTORY_ENTRY_EXPORT, &exp_size )))
{ {
const char *name = end + 1; const char *name = end + 1;
if (*name == '#') /* ordinal */
proc = find_ordinal_export( wm->ldr.DllBase, exports, exp_size, atoi(name+1), load_path ); if (*name == '#') { /* ordinal */
else proc = find_ordinal_export( wm->ldr.DllBase, exports, exp_size,
atoi(name+1) - exports->Base, load_path );
} else
proc = find_named_export( wm->ldr.DllBase, exports, exp_size, name, -1, load_path ); proc = find_named_export( wm->ldr.DllBase, exports, exp_size, name, -1, load_path );
} }