From 8b55a63ca9a425a58b4d2aeac9adf015fe7305f7 Mon Sep 17 00:00:00 2001 From: Corwin Kuiper Date: Wed, 28 Apr 2021 20:11:36 +0100 Subject: [PATCH] further satisfy linter --- agb/src/display/tiled0.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/agb/src/display/tiled0.rs b/agb/src/display/tiled0.rs index 3367a3e8..a31d662e 100644 --- a/agb/src/display/tiled0.rs +++ b/agb/src/display/tiled0.rs @@ -134,9 +134,7 @@ impl Background<'_> { fn map_get(&self, x: i32, y: i32, default: u16) -> u16 { let map = self.map.unwrap(); - if x >= self.map_dim_x as i32 || x < 0 { - default - } else if y >= self.map_dim_y as i32 || y < 0 { + if x >= self.map_dim_x as i32 || x < 0 || y >= self.map_dim_y as i32 || y < 0 { default } else { map[(self.map_dim_x as i32 * y + x) as usize]