Skip to content

Commit

Permalink
fix up some logic ive broken previously
Browse files Browse the repository at this point in the history
  • Loading branch information
h3xds1nz committed Jun 7, 2024
1 parent e3f6978 commit f684b2b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ private static void WinEventProc(int winEventHook, int eventId, IntPtr hwnd, int

try
{
int evt = EventIdToIndex.Length > eventId ? EventIdToIndex[eventId] : -1;
int evt = EventIdToIndex.BinarySearch(eventId);
if (evt < 0)
return; // negative means this event is unknown so ignore it

Expand Down Expand Up @@ -353,7 +353,7 @@ private static void BuildEventsList (EventFlag eFlag, IntPtr hwnd, ProxyRaiseEve
EvtIdProperty evtIdProp = aEvtIdProp[i];

// Map a property into a WinEventHookProperty
int evt = EventIdToIndex.Length > evtIdProp._evtId ? EventIdToIndex[evtIdProp._evtId] : -1;
int evt = EventIdToIndex.BinarySearch(evtIdProp._evtId);

// add the window to the list
if (evt >= 0)
Expand Down

0 comments on commit f684b2b

Please # to comment.