From 40dfa79612e4f788ff61d6ed47919412c7585b23 Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Tue, 22 Jan 2019 11:10:22 +0100 Subject: [PATCH] fix Open_popup() bug introduced in f9dc0358c4bfe2b4bcc1bb23ed3c437a32d78bec --- src/engine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine.c b/src/engine.c index 31ce685f..c63e3372 100644 --- a/src/engine.c +++ b/src/engine.c @@ -2425,7 +2425,7 @@ void Open_popup(word x_pos, word y_pos, word width,word height) height = Screen_height/Menu_factor_Y; if (y_pos + height*Menu_factor_Y > Screen_height) // fix dropdown that would get bellow the screen y_pos = Screen_height - height*Menu_factor_Y; - if (y_pos + width*Menu_factor_X > Screen_width) + if (x_pos + width*Menu_factor_X > Screen_width) x_pos = Screen_width - width*Menu_factor_X; Window_width=width;