In my variant, I go to the general store and buy stacks of 40 arrows until quiver is full then one more stack. At this point, object_absorb_partial() triggers an "assert(newsz2 < obj1->kind->base->max_stack);"
When I try the same in V, I don't get the assert (I suppose there is no combine pack in this case, so the bug is hidden). Looking at the code, when combine_pack() is called, I don't understand why it tries to combine full stacks at all, this makes no sense. Until the quiver is full, nothing happens (because there is no assert in this part of the code), although the code fuses the properties of two stacks of arrows for no reason, calling object_absorb_merge() on the two stacks that have no reason to be merged. Of course the assert triggers when the quiver is full since it now tries to merge one stack in the quiver and one stack in the pack that are both of size 40.
When I try the same in V, I don't get the assert (I suppose there is no combine pack in this case, so the bug is hidden). Looking at the code, when combine_pack() is called, I don't understand why it tries to combine full stacks at all, this makes no sense. Until the quiver is full, nothing happens (because there is no assert in this part of the code), although the code fuses the properties of two stacks of arrows for no reason, calling object_absorb_merge() on the two stacks that have no reason to be merged. Of course the assert triggers when the quiver is full since it now tries to merge one stack in the quiver and one stack in the pack that are both of size 40.
Comment