From 205d1fa7f76748d2ea9885f410c64726d3ba9620 Mon Sep 17 00:00:00 2001 From: stegerg Date: Sat, 26 Apr 2008 18:04:08 +0000 Subject: [PATCH] Do some (ULONG) casts when trying to make sure that new size is not bigger than MaxWidth, MaxHeight. Otherwise a MaxWidth, MaxHeight of -1 causes trouble. git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@28488 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- rom/intuition/zipwindow.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rom/intuition/zipwindow.c b/rom/intuition/zipwindow.c index 7f45a3646..aad6ba289 100644 --- a/rom/intuition/zipwindow.c +++ b/rom/intuition/zipwindow.c @@ -113,8 +113,8 @@ static VOID int_zipwindow(struct ZipWindowActionMsg *msg, NewWidth = w->ZipWidth; if (window->Flags & WFLG_SIZEGADGET) { - if (NewWidth < window->MinWidth) NewWidth = window->MinWidth; - if (NewWidth > window->MaxWidth) NewWidth = window->MaxWidth; + if (NewWidth < (ULONG)window->MinWidth) NewWidth = window->MinWidth; + if (NewWidth > (ULONG)window->MaxWidth) NewWidth = window->MaxWidth; } w->ZipWidth = w->window.Width; } @@ -125,8 +125,8 @@ static VOID int_zipwindow(struct ZipWindowActionMsg *msg, NewHeight = w->ZipHeight; if (window->Flags & WFLG_SIZEGADGET) { - if (NewHeight < window->MinHeight) NewHeight = window->MinHeight; - if (NewHeight > window->MaxHeight) NewHeight = window->MaxHeight; + if (NewHeight < (ULONG)window->MinHeight) NewHeight = window->MinHeight; + if (NewHeight > (ULONG)window->MaxHeight) NewHeight = window->MaxHeight; } w->ZipHeight = w->window.Height; } -- 2.11.4.GIT