Skip to content

Commit

Permalink
Never, never, never sort the keys during a page write.
Browse files Browse the repository at this point in the history
Reordering keys during write causes ObjIDs to be invalidated by writing
pages out. This means that users of tools like PRPShop have to click
save on specific PRP files in specific orders. For more information, see
pull request #218. The issue fixed here was introduced in ba1d890.
  • Loading branch information
Hoikas committed Oct 16, 2023
1 parent aa32355 commit 016587e
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions core/ResManager/plResManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,6 @@ void plResManager::WritePage(hsStream* S, plPageInfo* page)
std::vector<short> types = keys.getTypes(page->getLocation());
page->setClassList(types);

if (preserveIDs)
keys.sortKeys(page->getLocation());

page->write(S);
page->setDataStart(S->pos());
page->setNumObjects(WriteObjects(S, page->getLocation()));
Expand Down

0 comments on commit 016587e

Please sign in to comment.