From 1a8d171cbb7e735d3d213247ba0d04e2ac6a374e Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Mon, 26 Oct 2020 23:56:46 +0100
Subject: [PATCH] Fix box scale/position bug.

---
 new2/rogue_chat_nocanvas_monochrome.html | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/new2/rogue_chat_nocanvas_monochrome.html b/new2/rogue_chat_nocanvas_monochrome.html
index 97c0f08..df29814 100644
--- a/new2/rogue_chat_nocanvas_monochrome.html
+++ b/new2/rogue_chat_nocanvas_monochrome.html
@@ -44,12 +44,15 @@ let terminal = {
   drawBox: function(start_y, start_x, height, width) {
     let end_y = start_y + height;
     let end_x = start_x + width;
-    for (let y = start_y, x = start_x; y < end_y; x++) {
-        this.content[y][x] = ' ';
+      for (let y = start_y, x = start_x;; x++) {
         if (x == end_x) {
-            x = start_x - 1;
-            y += 1;
-        }
+          x = start_x;
+          y += 1;
+          if (y == end_y) {
+              break;
+          }
+        };
+        this.content[y][x] = ' ';
     }
   },
 }
-- 
2.30.2