]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Fix a typoed end-of-string check in testbn.
authorSimon Tatham <anakin@pobox.com>
Tue, 14 Feb 2017 20:39:22 +0000 (20:39 +0000)
committerSimon Tatham <anakin@pobox.com>
Tue, 14 Feb 2017 23:25:25 +0000 (23:25 +0000)
I was testing the actual pointer against NULL instead of testing the
pointed-to character against NUL.

testbn.c

index 576c18b79ef9d8aab9b6c909a7f6235198ef5e7f..2ea4f459cd5c20661915da4244f7a18700249d7e 100644 (file)
--- a/testbn.c
+++ b/testbn.c
@@ -55,7 +55,7 @@ int main(int argc, char **argv)
 
         while (*bufp && !isspace((unsigned char)*bufp))
             bufp++;
-        if (bufp)
+        if (*bufp)
             *bufp++ = '\0';
 
         while (*bufp) {