Skip to content

Fixed some issues with the evaluation of casts#733

Open
NoxMentis wants to merge 1 commit intoEpicGamesExt:masterfrom
NoxMentis:fix-64bit-cast-eval
Open

Fixed some issues with the evaluation of casts#733
NoxMentis wants to merge 1 commit intoEpicGamesExt:masterfrom
NoxMentis:fix-64bit-cast-eval

Conversation

@NoxMentis
Copy link
Copy Markdown

There are a few issues when parsing cast operations in the watch window. Most notably casting to a signed 64bit integer would truncate the full value:
cast_bug
Not sure if this is an appropriate way to fix it and there seems to be no operation to sign extend values so this is not complete.
For example these expressions still yield different values after the fix:
hex( (s64) ( (s32) 0xff223344ff667788 ) ) = 0xff667788
hex( (s64) (s32) 0xff223344ff667788 ) = -0x998878

…it integer would truncate all 64 bits. Also fixes an issue where a cast from a 64bit float to a 32bit signed integer would skip the conversion and instead truncate the top 32bits.
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