mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 11:01:49 +00:00
implement actual items dropping
This commit is contained in:
parent
89afcd15db
commit
5b154b57b3
4 changed files with 22 additions and 15 deletions
|
|
@ -32,7 +32,7 @@ static std::shared_ptr<Inventory> get_inventory(int64_t id, int arg) {
|
|||
}
|
||||
|
||||
static void validate_slotid(int slotid, Inventory* inv) {
|
||||
if (slotid < 0 || uint64_t(slotid) >= inv->size()) {
|
||||
if (static_cast<size_t>(slotid) >= inv->size()) {
|
||||
throw std::runtime_error("slot index is out of range [0..inventory.size(invid)]");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue