Skip to content

Conversation

@mastercoms
Copy link
Contributor

Description

Fixed misuse of type punning, this fixes undefined behavior with GCC causing uint64 types to be completely optimized away, resulting in mismatched KeyValues reads from binary due to the skipped value.

This is relevant to Linux clients and servers that send uint64 values as binary over the wire, including for SDK inventory messages and some game stats, usually for the SO item ID.

@mastercoms mastercoms changed the title Fix aliasing undefined behavior for KV uint64 type [ALL] Fix aliasing undefined behavior for KV uint64 type Oct 24, 2025
dimhotepus added a commit to Source-Authors/Obsoletium that referenced this pull request Oct 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant