- LdrpProcessImportDirectoryEntry: Don't try to fixup functions if an import address table is empty. Fixes Panzer General 2. Most of the work of discovering, fixing and testing this problem was performed by Olaf Siejka.

svn path=/trunk/; revision=45690
This commit is contained in:
Aleksey Bragin 2010-02-26 22:52:55 +00:00
parent 83038a06e3
commit 14fe274b1c

View file

@ -1600,6 +1600,9 @@ LdrpProcessImportDirectoryEntry(PLDR_DATA_TABLE_ENTRY Module,
IATSize++;
}
/* No need to fixup anything if IAT is empty */
if (IATSize == 0) return STATUS_SUCCESS;
/* Unprotect the region we are about to write into. */
IATBase = (PVOID)ImportAddressList;
IATSize *= sizeof(PVOID*);