Weird items sorting behaviours

Hi,

I noticed strange behaviours related to stackable items and condition.

How to reproduce :

  • Have many items that need repair (ex : armor)
  • Have lots of repair kits (100 condition)
  • Double-click on the repair kits to open the repair window
  • Click as fast as possible on the first item to repair it (and subsequent ones too)
  • Close the repair window : you may now have several partially-used kits, instead of only one (as if several kits had been partially used, instead of using one until it’s used up, then switching to the next one). They may also now be randomly sorted, irrespective of their condition.

Other weird behaviour :

  • Have several identical items, in different condition (ex : several saxon gambesons, several in 100 conditions, and others in worse condition), in you chest
  • Select the 100-condition ones and click on them to move them to your inventory
  • Move some but not all to your inventory : your items may now be weirdly ordered, with some worse-condition items listed before 100-condition ones, followed again by worse items.

It seems that the items sorting algorithm sometimes gets confused when item quantities change…