mirror of
https://github.com/hasherezade/hollows_hunter.git
synced 2026-10-11 21:49:55 +00:00
[REFACT] Fixed check if substring not found
This commit is contained in:
+1
-1
@@ -170,7 +170,7 @@ inline std::wstring getProcessName(const DWORD pid)
|
||||
std::wstring pName(processName);
|
||||
std::transform(pName.begin(), pName.end(), pName.begin(), tolower);
|
||||
std::size_t found = pName.find_last_of(L"/\\");
|
||||
if (found == (-1) || found >= pName.length()) {
|
||||
if (found == std::wstring::npos || found >= pName.length()) {
|
||||
return pName;
|
||||
}
|
||||
return pName.substr(found + 1);
|
||||
|
||||
Reference in New Issue
Block a user