From c022c806c1b4b1ad3652e96e1676084af3b5ff32 Mon Sep 17 00:00:00 2001 From: Sharat M R Date: Mon, 27 Apr 2015 05:25:33 +0530 Subject: [PATCH] move HMODULE m declaration to top --- src/win_delay_load_hook.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/win_delay_load_hook.c b/src/win_delay_load_hook.c index 05c4c39887..f397cfa195 100644 --- a/src/win_delay_load_hook.c +++ b/src/win_delay_load_hook.c @@ -16,6 +16,7 @@ #include static FARPROC WINAPI load_exe_hook(unsigned int event, DelayLoadInfo* info) { + HMODULE m; if (event != dliNotePreLoadLibrary) return NULL; @@ -23,7 +24,7 @@ static FARPROC WINAPI load_exe_hook(unsigned int event, DelayLoadInfo* info) { _stricmp(info->szDll, "node.exe") != 0) return NULL; - HMODULE m = GetModuleHandle(NULL); + m = GetModuleHandle(NULL); return (FARPROC) m; }