X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=testbn.c;h=2ea4f459cd5c20661915da4244f7a18700249d7e;hb=bec33b23119d9363854a2d0b4f4ca0fe893827aa;hp=55471bd24c0ac163a0b13c16402c1c5328a9103a;hpb=daeeca55a4ef109539dc3e67b758299cc03d35ea;p=PuTTY.git diff --git a/testbn.c b/testbn.c index 55471bd2..2ea4f459 100644 --- a/testbn.c +++ b/testbn.c @@ -12,6 +12,7 @@ #include #include "ssh.h" +#include "sshbn.h" void modalfatalbox(const char *p, ...) { @@ -38,6 +39,8 @@ int main(int argc, char **argv) int line = 0; int passes = 0, fails = 0; + printf("BIGNUM_INT_BITS = %d\n", (int)BIGNUM_INT_BITS); + while ((buf = fgetline(stdin)) != NULL) { int maxlen = strlen(buf); unsigned char *data = snewn(maxlen, unsigned char); @@ -52,7 +55,7 @@ int main(int argc, char **argv) while (*bufp && !isspace((unsigned char)*bufp)) bufp++; - if (bufp) + if (*bufp) *bufp++ = '\0'; while (*bufp) { @@ -79,8 +82,6 @@ int main(int argc, char **argv) val = val * 16 + fromxdigit(start[i+1]); *q++ = val; } - - ptrs[ptrnum] = q; } if (!strcmp(buf, "mul")) {