summaryrefslogtreecommitdiffhomepage
path: root/src/core.c
diff options
context:
space:
mode:
authorVictor Gallet <[email protected]>2020-12-31 13:29:35 +0100
committerGitHub <[email protected]>2020-12-31 13:29:35 +0100
commit57fef97433c2d2c14503c18ec9dadf68cf7052b4 (patch)
tree260093cf4c050f16bd7e19079fdca2bb9b1dde38 /src/core.c
parent03278a74bfb749a451c94de1c7c912c8a858ca41 (diff)
downloadraylib-57fef97433c2d2c14503c18ec9dadf68cf7052b4.tar.gz
raylib-57fef97433c2d2c14503c18ec9dadf68cf7052b4.zip
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)
Diffstat (limited to 'src/core.c')
-rw-r--r--src/core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core.c b/src/core.c
index 09f31678..42a4f78e 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)