From fd4745e5d345fcce8bd9f41c2f5a10482de448be Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Tue, 3 Sep 2013 16:29:19 +0200
Subject: [PATCH] Corrected off-by-one error in windows.c:refit_pad() that lead
 to failure of subpad memory allocation.

---
 src/windows.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/windows.c b/src/windows.c
index bd3ec41..080880c 100644
--- a/src/windows.c
+++ b/src/windows.c
@@ -79,7 +79,7 @@ static uint8_t refit_pad(struct WinMeta * wmeta)
     }
 
     /* Only resize the pad if the rightmost window column has changed. */
-    if (getmaxx(wmeta->padframe.curses_win) != lastwincol)
+    if (getmaxx(wmeta->padframe.curses_win) + 1 != lastwincol)
     {
         if (lastwincol + 2 > UINT16_MAX)
         {
-- 
2.30.2