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

Bigint: -1 < -2 #2638

Closed
guidovranken opened this issue Mar 4, 2021 · 3 comments
Closed

Bigint: -1 < -2 #2638

guidovranken opened this issue Mar 4, 2021 · 3 comments

Comments

@guidovranken
Copy link

#include <botan/bigint.h>

int main(void)
{
    printf("%d\n", Botan::BigInt("-1") < Botan::BigInt("-2"));
    return 0;
}

This prints 1. Is this intentional?

@randombit
Copy link
Owner

Not intentional - investigating

@randombit
Copy link
Owner

randombit commented Mar 4, 2021

Bug introduced in 00b6842 - operator< when both arguments were negative reversed the results.

@randombit
Copy link
Owner

Fixed on master and release-2 now thanks for the report.

winterland1989 pushed a commit to ZHaskell/botan that referenced this issue May 9, 2021
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

2 participants