From 57fef97433c2d2c14503c18ec9dadf68cf7052b4 Mon Sep 17 00:00:00 2001 From: Victor Gallet Date: Thu, 31 Dec 2020 13:29:35 +0100 Subject: [PATCH] Modify the check condition for the screen window height and width. It can't be less than zero because it's an unsigned int (#1497) --- src/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core.c b/src/core.c index 09f316781..42a4f78e7 100644 --- a/src/core.c +++ b/src/core.c @@ -3182,8 +3182,8 @@ static bool InitGraphicsDevice(int width, int height) CORE.Window.display.height = mode->height; // Screen size security check - if (CORE.Window.screen.width <= 0) CORE.Window.screen.width = CORE.Window.display.width; - if (CORE.Window.screen.height <= 0) CORE.Window.screen.height = CORE.Window.display.height; + if (CORE.Window.screen.width == 0) CORE.Window.screen.width = CORE.Window.display.width; + if (CORE.Window.screen.height == 0) CORE.Window.screen.height = CORE.Window.display.height; #endif // PLATFORM_DESKTOP #if defined(PLATFORM_WEB)