Skip to content

Fix edge case in transpose handling for 0xF9#67

Open
PhoenixBound wants to merge 1 commit intoPKHackers:masterfrom
PhoenixBound:transpose-fix-2
Open

Fix edge case in transpose handling for 0xF9#67
PhoenixBound wants to merge 1 commit intoPKHackers:masterfrom
PhoenixBound:transpose-fix-2

Conversation

@PhoenixBound
Copy link
Collaborator

@PhoenixBound PhoenixBound commented Jul 7, 2024

Using a negative transpose can cause unsigned overflow in the addition, which will set the carry flag. ebmused was only handling that properly for large positive transpositions.

Fixes an issue that Livvy and Crafty ran into but that wasn't reported or investigated until now.

To-do list:

  • Should we add a warning in the code list about this or something?
  • Test that it still builds on MSVC

Using a negative transpose can cause unsigned overflow in the addition,
which will set the carry flag. ebmused was only handling that properly
for large positive transpositions.
Fixes an issue that Livvy and Crafty ran into but that wasn't reported
or investigated until now.
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