]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Fix a 64-bit-cleanness error in sshcrc's generator.
authorSimon Tatham <anakin@pobox.com>
Tue, 26 Jan 2016 22:09:01 +0000 (22:09 +0000)
committerSimon Tatham <anakin@pobox.com>
Tue, 26 Jan 2016 22:09:01 +0000 (22:09 +0000)
Not that anyone actually needs to use that conditioned-out main(),
since it only generates the table already present in the same source
file, but since @ch3root's unused-variable patch touched it I tried
compiling it and noticed in passing that I'd also got the wrong printf
format directive for an unsigned long.

sshcrc.c

index 782d04bb47ed30c8a69f9adaf93b3512799c6a0c..a993e98b716533b895d7a768faa80b51506bcca5 100644 (file)
--- a/sshcrc.c
+++ b/sshcrc.c
@@ -202,7 +202,7 @@ int main(void)
 
     crc32_init();
     for (i = 0; i < 256; i++) {
-       printf("%s0x%08XL%s",
+       printf("%s0x%08lXL%s",
               (i % 4 == 0 ? "    " : " "),
               crc32_table[i],
               (i % 4 == 3 ? (i == 255 ? "\n" : ",\n") : ","));