]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - testbn.c
Pageant and PuTTYgen About boxes: add the website button.
[PuTTY.git] / testbn.c
index 55471bd24c0ac163a0b13c16402c1c5328a9103a..2ea4f459cd5c20661915da4244f7a18700249d7e 100644 (file)
--- a/testbn.c
+++ b/testbn.c
@@ -12,6 +12,7 @@
 #include <ctype.h>
 
 #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")) {