Bigint: -1 < -2
guidovranken opened this issue · 3 comments
guidovranken commented
#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 commented
Not intentional - investigating
randombit commented
Bug introduced in 00b6842 - operator< when both arguments were negative reversed the results.
randombit commented
Fixed on master and release-2 now thanks for the report.