summaryrefslogtreecommitdiff
path: root/src/map.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/map.rs')
-rw-r--r--src/map.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/map.rs b/src/map.rs
index 38fb326..dc50116 100644
--- a/src/map.rs
+++ b/src/map.rs
@@ -17,8 +17,16 @@ impl Map {
pub fn new(file: File, tileset: &Tileset) -> Map {
let elements = XMLElements::new(file);
- let width = elements.get_element_attribute("map", "width").unwrap();
- let height = elements.get_element_attribute("map", "height").unwrap();
+ let width = elements
+ .get_element_attribute("map", "width")
+ .unwrap()
+ .parse()
+ .unwrap();
+ let height = elements
+ .get_element_attribute("map", "height")
+ .unwrap()
+ .parse()
+ .unwrap();
let layers = elements
.events