From 4cc34410ddc1fafbbba91977e64e1d653037ce7e Mon Sep 17 00:00:00 2001 From: Mikkel Krautz Date: Sun, 21 Aug 2016 15:06:20 +0200 Subject: overlay/overlay_exe: use unsigned long long for our passed-in handle to silence MSVC2015 warning. Before: warning C4312: 'reinterpret_cast': conversion from 'unsigned long' to 'HANDLE' of greater size Also, please note the comment in src/mumble/Overlay_win.cpp regarding the 32-bit masking: https://msdn.microsoft.com/en-us/library/aa384203.aspx says: > When sharing a handle between 32-bit and 64-bit applications, only > the lower 32 bits are significant [...] --- overlay/overlay_exe/overlay_exe.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'overlay') diff --git a/overlay/overlay_exe/overlay_exe.cpp b/overlay/overlay_exe/overlay_exe.cpp index e3e1131a3..4d57801ed 100644 --- a/overlay/overlay_exe/overlay_exe.cpp +++ b/overlay/overlay_exe/overlay_exe.cpp @@ -150,8 +150,8 @@ int main(int argc, char **argv) { } try { - unsigned long passedInHandle = std::stoul(handleStr); - parent = reinterpret_cast(passedInHandle & 0xFFFFFFFFUL); + unsigned long long passedInHandle = std::stoull(handleStr); + parent = reinterpret_cast(passedInHandle & 0xFFFFFFFFULL); } catch(std::exception &) { return OVERLAY_HELPER_ERROR_EXE_INVALID_HANDLE_ARGUMENT; } -- cgit v1.2.3