uxn

Varvara Ordinator, written in ANSI C(SDL2)
git clone https://git.eamoncaddigan.net/uxn.git
Log | Files | Refs | README | LICENSE

commit cf84a5d66187dc620b25de35e62a77c506c15424
parent 37f2ba6a5aa8a8c3d2fb160777dd189a60c9edc8
Author: Andrew Alderwick <andrew@alderwick.co.uk>
Date:   Wed, 19 Jan 2022 18:30:32 +0000

Prevent invalid screen sizes.

Diffstat:
Msrc/uxnemu.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/uxnemu.c b/src/uxnemu.c @@ -113,7 +113,7 @@ set_window_size(SDL_Window *window, int w, int h) int set_size(Uint16 width, Uint16 height, int is_resize) { - screen_resize(&uxn_screen, width, height); + screen_resize(&uxn_screen, clamp(width, 1, 1024), clamp(height, 1, 1024)); gRect.x = PAD; gRect.y = PAD; gRect.w = uxn_screen.width;