diff options
Diffstat (limited to 'engines/glk')
-rw-r--r-- | engines/glk/utils.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/glk/utils.h b/engines/glk/utils.h index 2532f270a5..0da981abe3 100644 --- a/engines/glk/utils.h +++ b/engines/glk/utils.h @@ -40,6 +40,9 @@ typedef Common::Point Point; struct Rect : public Common::Rect { public: static Rect fromXYWH(int x, int y, int w, int h) { + if (w <= 0 || h <= 0) + return Rect(x, y, x, y); + return Rect(x, y, x + w, y + h); } |