Skip to content

Commit

Permalink
Fix cmd.exe ungraceful exit
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNNX committed Apr 23, 2024
1 parent 0b84df4 commit 08bc5cf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion COREDLL/winbase_wcecl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ BOOL SystemTimeToFileTime_WCECL(

BOOL FileTimeToLocalFileTime_WCECL(
const FILETIME* lpFileTime,
LPFILETIME lpLocalFileTime)
LPFILETIME lpLocalFileTime)
{
auto result = ::FileTimeToLocalFileTime(lpFileTime, lpLocalFileTime);
return result;
Expand Down Expand Up @@ -590,6 +590,11 @@ BOOL WINAPI TerminateProcess_WCECL(
HANDLE hProcess,
DWORD uExitCode)
{
/* GetCurrentProcess() seems to be inlined to 0x42 for WinCE */
if (hProcess == (HANDLE)0x42)
{
hProcess = GetCurrentProcess();
}
auto result = ::TerminateProcess(hProcess, uExitCode);
return result;
}
Expand Down

0 comments on commit 08bc5cf

Please sign in to comment.