Skip to content

Commit b80ab71

Browse files
committed
Use explicit downcast for 64-bit targets
GetLastError() is a DWORD (unsigned long) which is 64-bits on 64-bit targets, while ExitProcess() takes UINT (unsigned int) which is always 32-bits (for Windows targets).
1 parent 3c3ace3 commit b80ab71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

paste/paste.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ void Write(const wchar_t *text, DWORD outputHandle = STD_OUTPUT_HANDLE, DWORD ch
111111
nullptr);
112112
result = WriteFile(hOut, _utf8Buffer.Buffer, bytesConverted, &charsWritten, nullptr);
113113
if (charsWritten != utf8ByteCount) {
114-
ExitProcess(GetLastError());
114+
ExitProcess((UINT) GetLastError());
115115
}
116116
}
117117

0 commit comments

Comments
 (0)