desktop_util: Make ShellExecute() result cast 64-bit-safe
int is not a sufficiently large type for casting a pointer type on 64-bit Windows, so use ptrdiff_t instead. Tested by vultraz.
This commit is contained in:
parent
d7e3b87584
commit
6307e19ddb
1 changed files with 1 additions and 1 deletions
|
@ -85,7 +85,7 @@ bool open_in_file_manager(const std::string& path)
|
|||
wide_string wpath = utils::string_to_wstring(path);
|
||||
wpath.push_back(wchar_t(0)); // Make wpath NULL-terminated
|
||||
|
||||
const int res = reinterpret_cast<int>(ShellExecute(NULL, L"open", &wpath.front(), NULL, NULL, SW_SHOW));
|
||||
const ptrdiff_t res = reinterpret_cast<ptrdiff_t>(ShellExecute(NULL, L"open", &wpath.front(), NULL, NULL, SW_SHOW));
|
||||
if(res <= 32) {
|
||||
ERR_DE << "open_in_file_manager(): ShellExecute() failed (" << res << ")\n";
|
||||
return false;
|
||||
|
|
Loading…
Add table
Reference in a new issue