randombit/botan

Bigint: -1 < -2

guidovranken opened this issue · 3 comments

#include <botan/bigint.h>

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

This prints 1. Is this intentional?

Not intentional - investigating

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

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