Skip to content

Conversation

@Rainyan
Copy link

@Rainyan Rainyan commented Jul 7, 2025

Int to pointer conversion is implementation-defined. Use the platform-specific max value, because else we can get a value of 0x00000000FFFFFFFF when we wanted 0xFFFFFFFFFFFFFFFF if extending a 32-bit integer to a 64-bit pointer.

Also fixes the compiler warning about this conversion for both Windows & Linux.

Else we can get 0x00000000FFFFFFFF when we wanted 0xFFFFFFFFFFFFFFFF
@Rainyan Rainyan changed the title Fix int to ptr extension for x64 Fix int to ptr conversion for x64 Jul 7, 2025
@AdamTadeusz AdamTadeusz merged commit dbebf6c into AdamTadeusz:240_nextbots Jul 8, 2025
@Rainyan Rainyan deleted the bug/sign-extension branch July 10, 2025 18:24
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.

2 participants