From 9ff1c0e327bfa10c154cdb051d9c15a8fa96e7f8 Mon Sep 17 00:00:00 2001 From: Kevin Lamonte Date: Thu, 24 Aug 2017 17:13:15 -0400 Subject: [PATCH] Fix bounds check --- src/jexer/TApplication.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/jexer/TApplication.java b/src/jexer/TApplication.java index b7c5f8e..e319a4d 100644 --- a/src/jexer/TApplication.java +++ b/src/jexer/TApplication.java @@ -1941,10 +1941,16 @@ public class TApplication implements Runnable { continue; } for (int x = w.getX(); x < w.getX() + w.getWidth(); x++) { + if (x < 0) { + continue; + } if (x >= width) { continue; } for (int y = w.getY(); y < w.getY() + w.getHeight(); y++) { + if (y < 0) { + continue; + } if (y >= height) { continue; } -- 2.27.0