mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-21 20:25:47 +00:00
path_util: Resolve -Wpointer-bool-conversion
warning
Clang (rightfully) warns that we are checking for the existence of pointer to something just allocated on the stack, which is always true. Instead, check whether GetModuleFileNameW failed. Co-authored-by: Mai M <mathew1800@gmail.com>
This commit is contained in:
parent
6c88f50725
commit
b73aaea0c1
1 changed files with 1 additions and 3 deletions
|
@ -232,9 +232,7 @@ void SetYuzuPath(YuzuPath yuzu_path, const fs::path& new_path) {
|
|||
fs::path GetExeDirectory() {
|
||||
wchar_t exe_path[MAX_PATH];
|
||||
|
||||
GetModuleFileNameW(nullptr, exe_path, MAX_PATH);
|
||||
|
||||
if (!exe_path) {
|
||||
if (GetModuleFileNameW(nullptr, exe_path, MAX_PATH) == 0) {
|
||||
LOG_ERROR(Common_Filesystem,
|
||||
"Failed to get the path to the executable of the current process");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue