From 35a4b190b780317651cac4d35c07cce4ef9046db Mon Sep 17 00:00:00 2001 From: Andy Newjack Date: Wed, 1 Jul 2020 17:33:11 -0300 Subject: [PATCH] don't crash if min and max meseta is the same --- src/ship/drops/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ship/drops/mod.rs b/src/ship/drops/mod.rs index 620b4b7..edfa8db 100644 --- a/src/ship/drops/mod.rs +++ b/src/ship/drops/mod.rs @@ -131,7 +131,7 @@ impl DropTable { } fn generate_meseta(&mut self, monster: &MonsterDropStats) -> Option { - Some(ItemDropType::Meseta(self.rng.gen_range(monster.min_meseta, monster.max_meseta))) + Some(ItemDropType::Meseta(self.rng.gen_range(monster.min_meseta, monster.max_meseta + 1))) } fn generate_typed_drop(&mut self, map_area: &MapArea, monster: &MonsterDropStats) -> Option {