Skip to content

Commit 9a2f8a2

Browse files
committed
fixed typo
1 parent aa4e675 commit 9a2f8a2

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

premake5.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ workspace "d3d9-wrapper"
1111
targetname "d3d9"
1212
targetextension ".dll"
1313
characterset ("MBCS")
14-
flags { "StaticRuntime" }
14+
staticruntime "On"
1515

1616
defines { "rsc_CompanyName=\"ThirteenAG\"" }
1717
defines { "rsc_LegalCopyright=\"MIT License\""}

source/iathook.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace Iat_hook
1212
{
1313
if (!hModule)
1414
hModule = GetModuleHandle(nullptr);
15-
15+
1616
const DWORD_PTR instance = reinterpret_cast<DWORD_PTR>(hModule);
1717
const PIMAGE_NT_HEADERS ntHeader = reinterpret_cast<PIMAGE_NT_HEADERS>(instance + reinterpret_cast<PIMAGE_DOS_HEADER>(instance)->e_lfanew);
1818
PIMAGE_IMPORT_DESCRIPTOR pImports = reinterpret_cast<PIMAGE_IMPORT_DESCRIPTOR>(instance + ntHeader->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT].VirtualAddress);
@@ -53,7 +53,7 @@ namespace Iat_hook
5353
__except ((GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION) ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH)
5454
{
5555
}
56-
56+
5757
__try
5858
{
5959
for (IMAGE_IMPORT_DESCRIPTOR* iid = pImports; iid->Name != 0; iid++) {
@@ -74,7 +74,7 @@ namespace Iat_hook
7474
{
7575
char* mod_func_name = (char*)(mod_func_ptr_ord + (size_t)hModule + 2);
7676
const intptr_t nmod_func_name = (intptr_t)mod_func_name;
77-
if (nmod_func_name >= 0 && !lstrcmpA(function, mod_func_name))
77+
if (nmod_func_name >= 0 && !lstrcmpA(function, mod_func_name)) {
7878
return func_idx + (void**)(iid->FirstThunk + (size_t)hModule);
7979
}
8080
}
@@ -84,11 +84,11 @@ namespace Iat_hook
8484
__except ((GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION) ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH)
8585
{
8686
}
87-
87+
8888
return 0;
8989
}
9090

91-
uintptr_t detour_iat_ptr(const char* function, void* newfunction, HMODULE hModule = NULL , const char* chModule = NULL, const DWORD ordinal = 0)
91+
uintptr_t detour_iat_ptr(const char* function, void* newfunction, HMODULE hModule = NULL, const char* chModule = NULL, const DWORD ordinal = 0)
9292
{
9393
void** func_ptr = find_iat_func(function, hModule, chModule, ordinal);
9494
if (!func_ptr || *func_ptr == newfunction || *func_ptr == NULL)

0 commit comments

Comments
 (0)