mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
Fix missing check for 0 in craft replacements
This commit is contained in:
@@ -235,8 +235,8 @@ static void craftDecrementOrReplaceInput(CraftInput &input,
|
||||
}
|
||||
}
|
||||
}
|
||||
// No replacement was found, simply decrement count to zero
|
||||
if (!found_replacement)
|
||||
// No replacement was found, simply decrement count by one
|
||||
if (!found_replacement && it->count > 0)
|
||||
it->remove(1);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user