From b28833357c0b67e6146e0ac568f5cfd6696f08cd Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Tue, 27 Oct 2020 00:07:02 +0100
Subject: [PATCH] Fix map line width check.

---
 new2/plomrogue/mapping.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/new2/plomrogue/mapping.py b/new2/plomrogue/mapping.py
index 2edbea8..f056e10 100644
--- a/new2/plomrogue/mapping.py
+++ b/new2/plomrogue/mapping.py
@@ -1,4 +1,5 @@
 import collections
+from plomrogue.errors import ArgError
 
 
 
@@ -89,8 +90,8 @@ class Map():
         if y >= height_map:
             raise ArgError('too large row number %s' % y)
         width_line = len(line)
-        if width_line > width_map:
-            raise ArgError('too large map line width %s' % width_line)
+        if width_line != width_map:
+            raise ArgError('map line width %s unequal map width %s' % (width_line, width_map))
         self.terrain = self.terrain[:y * width_map] + line +\
                        self.terrain[(y + 1) * width_map:]
 
-- 
2.30.2