From: Kevin Lamonte Date: Thu, 24 Aug 2017 21:13:15 +0000 (-0400) Subject: Fix bounds check X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=9ff1c0e327bfa10c154cdb051d9c15a8fa96e7f8;p=fanfix-jexer.git Fix bounds check --- 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; }