From d63a978c353126f4ce286fa7172b7a6d22c765d9 Mon Sep 17 00:00:00 2001
From: pompolic <pompolic@special-circumstanc.es>
Date: Tue, 11 Oct 2022 18:26:53 +0200
Subject: [PATCH] Fix off-by-one error

---
 gdb-port/top-level-parse.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb-port/top-level-parse.py b/gdb-port/top-level-parse.py
index 80b19d8..44dc92d 100644
--- a/gdb-port/top-level-parse.py
+++ b/gdb-port/top-level-parse.py
@@ -404,7 +404,7 @@ class TopLevelParse:
 		if w == 0:
 			print("all tokens passed to display are zero-width")
 			return
-		charbuf = [[' '] * w for i in range(0,h+1)]
+		charbuf = [[' '] * w for i in range(0,h)]
 		print("h=len(charbuf):", len(charbuf), "w :", w)
 		tokenmap_values_sorted = sorted(tokenmap_val_list, key=lambda token: (token['start'], token['end']))
 		print("len(tokenmap_values_sorted):", len(tokenmap_values_sorted), "rows:", numrows)
-- 
GitLab