Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4 byte negative numbers not working #44

Open
ghost opened this issue Dec 5, 2019 · 0 comments
Open

4 byte negative numbers not working #44

ghost opened this issue Dec 5, 2019 · 0 comments

Comments

@ghost
Copy link

ghost commented Dec 5, 2019

Testing if a number is within a range, returns 1 (i.e. 'true'):

script      1 -100 100 OP_WITHIN
script_hex  5101e40164a5
stack       1

script      1 -8388607 8388607 OP_WITHIN
script_hex  5103ffffff03ffff7fa5
stack       1

Increment the range (numbers now 4 bytes), returns 0 which is incorrect it should be 1.

script      1 -8388608 8388608 OP_WITHIN
script_hex  5104000080800400008000a5
stack       0

This test is from bitcoin core, expected return value is 1.

script      0 -2147483647 2147483647 OP_WITHIN
script_hex  0004ffffffff04ffffff7fa5
stack       0
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

No branches or pull requests

0 participants