From a195fde2ea9af0e6d6a6677810c5c8b741178cbf Mon Sep 17 00:00:00 2001 From: RamonUnch <74856804+RamonUnch@users.noreply.github.com> Date: Tue, 15 Feb 2022 11:49:47 +0100 Subject: [PATCH] proper cast... --- GpMain.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GpMain.cpp b/GpMain.cpp index 015c13fa..c37dba77 100644 --- a/GpMain.cpp +++ b/GpMain.cpp @@ -147,8 +147,8 @@ LRESULT GreenPadWnd::on_message( UINT msg, WPARAM wp, LPARAM lp ) pt.y -= wnd.top; // Adjust rects so that it does not include SB nor scrollbars. - nc->rgrc[2].right -= Max(24L, (wnd.right-wnd.left) - nc->lppos->cx+24); - nc->rgrc[2].bottom -= Max(45L, (wnd.bottom-wnd.top) - nc->lppos->cy+45); + nc->rgrc[2].right -= Max((long)24, (long)((wnd.right-wnd.left) - nc->lppos->cx+24)); + nc->rgrc[2].bottom -= Max((long)45, (long)((wnd.bottom-wnd.top) - nc->lppos->cy+45)); // Do not include caption+menu in BitBlt nc->rgrc[1].left = nc->lppos->x + pt.x;