Skip to content

Commit

Permalink
Fixed an access violation while removing a hook.
Browse files Browse the repository at this point in the history
  • Loading branch information
TsudaKageyu committed Jul 20, 2014
1 parent ed2fe31 commit a1bcc24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hook.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ struct
// returns: >= 0 if the element in contained, < 0 (-insertPos-1) if not
static UINT FindHookEntry(LPVOID pTarget)
{
UINT left, right;
INT left, right;

if (g_hooks.size == 0)
return UINT_MAX;
Expand All @@ -127,7 +127,7 @@ static UINT FindHookEntry(LPVOID pTarget)

do
{
UINT center = (left + right) / 2;
INT center = (left + right) / 2;

if ((ULONG_PTR)g_hooks.pItems[center].pTarget == (ULONG_PTR)pTarget)
return center; // found
Expand Down

0 comments on commit a1bcc24

Please # to comment.