mirror of https://github.com/UMSKT/xpmgr.git
more fixes
This commit is contained in:
parent
d3e9089700
commit
823e44ec56
|
@ -402,7 +402,7 @@ void safeStrncat(char* destination, const char* source, size_t size) {
|
|||
strncat(destination, source, size - destLen - 1); // -1 for the null terminator
|
||||
} else {
|
||||
// Handle buffer overflow error
|
||||
std::cerr << "Error: Buffer overflow during strncat operation." << std::endl;
|
||||
std::cout << "An error occurred at safeStrncat: Buffer overflow during strncat operation." << std::endl;
|
||||
}
|
||||
}
|
||||
#pragma clang diagnostic pop
|
||||
|
@ -412,7 +412,7 @@ bool IsProcessRunning(const wchar_t* processName)
|
|||
HANDLE snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
|
||||
if (snapshot == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
std::cerr << "Failed to create process snapshot." << std::endl;
|
||||
std::cout << "An error occurred at IsProcessRunning: Failed to create process snapshot." << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -421,7 +421,7 @@ bool IsProcessRunning(const wchar_t* processName)
|
|||
if (!Process32FirstW(snapshot, &processEntry))
|
||||
{
|
||||
CloseHandle(snapshot);
|
||||
std::cerr << "Failed to retrieve process information." << std::endl;
|
||||
std::cout << "An error occurred at IsProcessRunning: Failed to retrieve process information." << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue