Fix bounds check
authorKevin Lamonte <kevin.lamonte@gmail.com>
Thu, 24 Aug 2017 21:13:15 +0000 (17:13 -0400)
committerKevin Lamonte <kevin.lamonte@gmail.com>
Thu, 24 Aug 2017 21:13:15 +0000 (17:13 -0400)
src/jexer/TApplication.java

index b7c5f8ef51e5c63f30605d840d8dab0967f1b86b..e319a4df410dba7ae7c7ab552dfa1d5e824fb47d 100644 (file)
@@ -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;
                     }