-
Notifications
You must be signed in to change notification settings - Fork 89
Open
Description
`
char buffer[500];
struct bn a, b, c;
bignum_from_string(&a, "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe", 64);
bignum_to_string(&a, buffer, 500);
printf("%s\n", buffer);
bignum_from_int(&b, 3);
bignum_add(&a, &b, &c);
bignum_to_string(&c, buffer, 500);
printf("%s\n", buffer);
`
length of "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe" is 63
if I change 64 to 63 and comment out
// require((nbytes & 1) == 0, "string format must be in hex -> equal number of bytes"); // require((nbytes % (sizeof(DTYPE) * 2)) == 0, "string length must be a multiple of (sizeof(DTYPE) * 2) characters");
that code works correct
PR created: #26
Metadata
Metadata
Assignees
Labels
No labels