From cdb25ea11b2e597e823f4439655d1afd589d98b8 Mon Sep 17 00:00:00 2001 From: akallabeth Date: Thu, 3 Oct 2024 13:15:25 +0200 Subject: [PATCH] [warnings] fix integer narrowing --- libfreerdp/gdi/pen.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libfreerdp/gdi/pen.c b/libfreerdp/gdi/pen.c index 4d0a3a373..cbd091edc 100644 --- a/libfreerdp/gdi/pen.c +++ b/libfreerdp/gdi/pen.c @@ -52,7 +52,8 @@ HGDI_PEN gdi_CreatePen(UINT32 fnPenStyle, UINT32 nWidth, UINT32 crColor, UINT32 hPen->objectType = GDIOBJECT_PEN; hPen->style = fnPenStyle; hPen->color = crColor; - hPen->width = nWidth; + WINPR_ASSERT(nWidth <= INT32_MAX); + hPen->width = (int)nWidth; hPen->format = format; hPen->palette = palette; return hPen;