Fix off-by-one panic in tile_info
This commit is contained in:
parent
6420866b3d
commit
23eed81343
1 changed files with 1 additions and 1 deletions
|
@ -30,7 +30,7 @@ impl WindowSystem for TileInfo<'_, '_> {
|
||||||
|
|
||||||
let world_manager = world.resource::<WorldManager>();
|
let world_manager = world.resource::<WorldManager>();
|
||||||
if cursor_x >= 0
|
if cursor_x >= 0
|
||||||
&& cursor_x <= world_manager.world().width.try_into().unwrap()
|
&& cursor_x < world_manager.world().width.try_into().unwrap()
|
||||||
&& cursor_y >= 0
|
&& cursor_y >= 0
|
||||||
&& cursor_y < world_manager.world().height.try_into().unwrap()
|
&& cursor_y < world_manager.world().height.try_into().unwrap()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue