Skip to content
This repository has been archived by the owner on Apr 19, 2022. It is now read-only.

Commit

Permalink
Update Aqua.c
Browse files Browse the repository at this point in the history
aphage authored Apr 7, 2020
1 parent 9248536 commit 17af720
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Aqua.c
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
MIT License
Copyright (c) 2017 Sheen
Copyright (c) 2020 aphage
Copyright (c) Misaka Mikoto (aphage)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -262,8 +262,8 @@ FARPROC RGetProcAddress(HMODULE hModule, LPSTR name, WORD number) {
PWORD pOrdinalTable = MakePointer(PWORD, hModule, pImageExportDirectory->AddressOfNameOrdinals);

DWORD addressOffset = 0;
if (name == NULL && number >= pImageExportDirectory->Base) {
if (pImageExportDirectory->NumberOfFunctions > (number - pImageExportDirectory->Base))
if (name == NULL) {
if (number >= pImageExportDirectory->Base && pImageExportDirectory->NumberOfFunctions > (number - pImageExportDirectory->Base))
addressOffset = pAddressTable[number - pImageExportDirectory->Base];
else
return NULL;

0 comments on commit 17af720

Please sign in to comment.