Skip to content

Commit

Permalink
fix NiObjectNET::AddExtraData
Browse files Browse the repository at this point in the history
  • Loading branch information
ianpatt committed Feb 22, 2025
1 parent 9843a23 commit 3fc89c5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion skse64/NiObjects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ void NiRefObject::DecRef(void)

int ExtraDataCompare(const void * ls, const void * rs)
{
return (int)((*(NiExtraData**)ls)->m_pcName - (*(NiExtraData**)rs)->m_pcName);
auto lhs = (*(NiExtraData**)ls)->m_pcName;
auto rhs = (*(NiExtraData**)rs)->m_pcName;

// difference truncated to an int loses important bits
return (lhs > rhs) - (lhs < rhs);
}

void NiObjectNET::AddExtraData(NiExtraData * extraData)
Expand Down
1 change: 1 addition & 0 deletions skse64_whatsnew.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
2.2.7
- don't spam OnCrosshairRefChange when player controls are disabled (thanks ferarri365 for the bug report)
- NiObjectNET::AddExtraData could misorder the list (function not used by SKSE itself, thanks UaineMazoku for the bug report)

2.2.6
- support for 1.6.1170
Expand Down

0 comments on commit 3fc89c5

Please sign in to comment.