From 8164be4d1b6e6a9d36e8c7f0f58d4f799f990a25 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Sat, 5 Mar 2016 12:37:18 +0100 Subject: [PATCH] Client: Fix bug adding win width padding to log lines when not needed. --- client/windows.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/windows.py b/client/windows.py index 9eddc1c..3966d0c 100644 --- a/client/windows.py +++ b/client/windows.py @@ -108,7 +108,8 @@ def win_log(self): number_of_lines = 0 for line in world_data["log"]: number_of_lines += math.ceil(len(line) / win_size[1]) - padding_size = win_size[1] - (len(line) % win_size[1]) + mod = len(line) % win_size[1] + padding_size = 0 if mod == 0 else win_size[1] - mod winmap += line + (padding_size * " ") if number_of_lines < win_size[0]: winmap = (" " * win_size[1] * (win_size[0] - number_of_lines)) + winmap -- 2.30.2