When using a vending machine a person can create a situation where the vending machine has an odd number in the inventory.
Easiest way to replicate have a full inventory and more then a full stack of what you wanna set up.
Step 1: put 50 stone in vending machine.
Step 2: fill inventory with grass.
Step 3: have 5995 stone in final inventory slot.
step 4: take a stack of 50 from vending (it will fill stack in inventory and leave 45 in vending)
step 5: free a slot in inventory and take stack from vending (inventory of vending will show 45, but because vending machines cant break up stacks below 50 it will prompt for 50)
after vending machine will show -5.
Step 6: exit vending machine and reopen. stack will now be 65k+ (with remaining odd numbers and stack will be always broken unless you take all with an empty inventory)
This glitch can be used on personal vending machines and trader vending machines, and its not restricted to just one item either you can fill the vending machine with all the building material, ammo, and everything that is forced to be inserted and removed in stacks of an size above 1.