libwine: Add support for relocating MS-style imports that use OriginalFirstThunk.

This commit is contained in:
Alexandre Julliard 2008-09-04 21:52:36 +02:00
parent 6e90756307
commit 4eb350b86b
1 changed files with 1 additions and 1 deletions

View File

@ -277,7 +277,7 @@ static void fixup_imports( IMAGE_IMPORT_DESCRIPTOR *dir, BYTE *base, int delta )
fixup_rva_dwords( &dir->u.OriginalFirstThunk, delta, 1 );
fixup_rva_dwords( &dir->Name, delta, 1 );
fixup_rva_dwords( &dir->FirstThunk, delta, 1 );
ptr = (UINT_PTR *)(base + dir->FirstThunk);
ptr = (UINT_PTR *)(base + (dir->u.OriginalFirstThunk ? dir->u.OriginalFirstThunk : dir->FirstThunk));
while (*ptr)
{
if (!(*ptr & IMAGE_ORDINAL_FLAG)) *ptr += delta;