Fixed #442 for .NET Core

nullableenabled
David Hall 2024-03-25 16:11:02 -06:00
parent 8ea569f81c
commit b5ba4dce9c
1 changed files with 1 additions and 1 deletions

View File

@ -2494,7 +2494,7 @@ public static partial class User32
public static IntPtr GetWindowLongAuto(HWND hWnd, WindowLongFlags nIndex)
{
SetLastErrorEx(0, 0);
IntPtr ret = IntPtr.Size == 4 ? GetWindowLong(hWnd, nIndex) : GetWindowLongPtr(hWnd, nIndex);
IntPtr ret = IntPtr.Size == 4 ? (IntPtr)GetWindowLong(hWnd, nIndex) : GetWindowLongPtr(hWnd, nIndex);
if (ret == IntPtr.Zero)
Win32Error.GetLastError().ThrowIfFailed();
return ret;