Skip to content

Commit

Permalink
kill event in case of error
Browse files Browse the repository at this point in the history
  • Loading branch information
tomysshadow committed Oct 14, 2022
1 parent 05e23a2 commit 1de4f4a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion OldCPUSimulator/OldCPUSimulator.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class OldCPUSimulator {
NtQuerySystemInformationProc ntQuerySystemInformation = NULL;

inline bool OldCPUSimulator::wait(UINT waitMs, UINT s2, HANDLE timeEvent) {
UINT timerID = timeSetEvent(waitMs, 0, (LPTIMECALLBACK)timeEvent, 0, TIME_ONESHOT | TIME_CALLBACK_EVENT_SET);
UINT timerID = timeSetEvent(waitMs, 0, (LPTIMECALLBACK)timeEvent, 0, TIME_ONESHOT | TIME_CALLBACK_EVENT_SET | TIME_KILL_SYNCHRONOUS);

if (!timerID) {
return false;
Expand Down
2 changes: 1 addition & 1 deletion OldCPUSimulator/shared.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ std::string getArgumentSliceFromCommandLine(std::string commandLine, int begin,
end += argumentsSize;
}

end = min(argumentsSize - 1, end);
end = min((int)argumentsSize - 1, end);

std::string argumentSlice = "";

Expand Down

0 comments on commit 1de4f4a

Please sign in to comment.