X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;f=client%2Fwindows.py;h=3966d0c4d20312b9cc99b8f746ac8a67928f59d8;hb=5bbcda8ee4e25d43627e94b534f72a12da95e66e;hp=4177bed7cfd4a47722f4b3ff85b2226568daa993;hpb=3d4ef72a869787ade399af85a42ab0aef9d73766;p=plomrogue
diff --git a/client/windows.py b/client/windows.py
index 4177bed..3966d0c 100644
--- a/client/windows.py
+++ b/client/windows.py
@@ -1,3 +1,8 @@
+# This file is part of PlomRogue. PlomRogue is licensed under the GPL version 3
+# or any later version. For details on its copyright, license, and warranties,
+# see the file NOTICE in the root directory of the PlomRogue source package.
+
+
import math
import curses
@@ -103,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