This commit is contained in:
Charles Milette 2018-11-19 14:35:33 -05:00
parent e7e30a46c2
commit a0b266d492
No known key found for this signature in database
GPG key ID: 1A5AE81377AD973A

View file

@ -302,7 +302,7 @@ protected override void WndProc(ref Message m)
{
if (m.Msg == (int)WindowsMessages.QUERYENDSESSION)
{
// Calling ToInt64 because the int conversion operator (called when irectly casting the IntPtr to the enum)
// Calling ToInt64 because the int conversion operator (called when directly casting the IntPtr to the enum)
// enforces checked semantics thus crashes any 64 bits build. ToInt64() and long -> enum conversion doesn't.
EndSessionReasons reason = (EndSessionReasons)m.LParam.ToInt64();
if (reason.HasFlag(EndSessionReasons.ENDSESSION_CLOSEAPP))