Skip to content
  • Milian Wolff's avatar
    Fix various other issues with monster buckets in the ItemRepository · 16cedcbc
    Milian Wolff authored
    By always enabling the debug defines in the test_itemrepository we
    easily ran into all kinds of assertions. Some where wrong, but most
    where at least partially correct and uncovered a wealth of connected
    issues which I could not detangle from another. As such, this patch
    sadly does a few things together, as otherwise the tests would always
    fail. Thankfully, at the end, I managed to run not only the tests
    with the debug assertions enabled, but could also parse a large
    real-world application and save/load it from the cache! Previously,
    both would always lead to assertions in various places.
    
    Some of the issues that I uncovered:
    
    - We never marked the tails of the monster buckets anywhere, meaning
      when we got an item request that fell into a bucket index that was
      merged with others to form a monster bucket we didn't detect it
      and silently corrupted the data by just writing the new item data
      into the bucket as-if it was an uninitializ...
    16cedcbc