mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Client: fix unknown texture upon shift-move to full inventory list (#14586)
Fixes a regression caused by 4245a760
'moveItemSomewhere' attempted to add a leftover stack to an empty stack, resulting
in an empty name with non-0 ItemStack count.
This commit is contained in:
parent
72cb4e9bea
commit
c044a3c1ca
2 changed files with 27 additions and 2 deletions
|
@ -758,8 +758,9 @@ void InventoryList::moveItemSomewhere(u32 i, InventoryList *dest, u32 count)
|
|||
|
||||
if (!leftover.empty()) {
|
||||
// Add the remaining part back to the source item
|
||||
ItemStack &source = getItem(i);
|
||||
source.add(leftover.count); // do NOT use addItem to allow oversized stacks!
|
||||
// do NOT use addItem to allow oversized stacks!
|
||||
leftover.add(getItem(i).count);
|
||||
changeItem(i, leftover);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue