Skip to content

Commit de35cba

Browse files
committed
restrict those values.
(fix for new items added through ruleset)
1 parent a7691b4 commit de35cba

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/Menu/NewBattleState.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,8 @@ void NewBattleState::initSave()
340340
if (rule->getBattleType() != BT_NONE && !rule->isFixed() && (*i).substr(0, 8) != "STR_HWP_")
341341
{
342342
int amount = Options::getInt("NewBattle_" + rule->getName());
343+
amount = std::max(0, std::min(100, amount));
344+
343345
_craft->getItems()->addItem(*i, amount);
344346
}
345347
}

0 commit comments

Comments
 (0)