diff options
author | Mattias Andrée [mˈa.tːiː.ˌas ˈanː.drˌeː] <maandree@operamail.com> | 2014-02-09 22:29:42 +0000 |
---|---|---|
committer | Mattias Andrée [mˈa.tːiː.ˌas ˈanː.drˌeː] <maandree@operamail.com> | 2014-02-09 22:29:42 +0000 |
commit | 88f3a30204d4e8b8a6f60f9938d1970ba76ea32b (patch) | |
tree | 523e9234381e567fde714d2e9e5e080dbe88e1bb /c/sha3sum.c | |
parent | Merge pull request #9 from kseistrup/patch-1 (diff) | |
parent | Update sha3sum.c (diff) | |
download | sha3sum-88f3a30204d4e8b8a6f60f9938d1970ba76ea32b.tar.gz sha3sum-88f3a30204d4e8b8a6f60f9938d1970ba76ea32b.tar.bz2 sha3sum-88f3a30204d4e8b8a6f60f9938d1970ba76ea32b.tar.xz |
Merge pull request #11 from kseistrup/patch-2
Update sha3sum.c
Diffstat (limited to 'c/sha3sum.c')
-rw-r--r-- | c/sha3sum.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/c/sha3sum.c b/c/sha3sum.c index 4af290f..6d46b81 100644 --- a/c/sha3sum.c +++ b/c/sha3sum.c @@ -646,6 +646,7 @@ int main(int argc, char** argv) *(out + outptr++) = HEXADECA[(v >> 4) & 15]; *(out + outptr++) = HEXADECA[v & 15]; } + out[outptr] = '\0'; printf("%s %s\n", out, filename ? filename : "-"); } } @@ -662,6 +663,7 @@ int main(int argc, char** argv) out[b * 2 ] = HEXADECA[(v >> 4) & 15]; out[b * 2 + 1] = HEXADECA[v & 15]; } + out[b*2] = '\0'; printf("%s %s\n", out, filename ? filename : "-"); } for (_ = 1; _ < i; _++) @@ -685,6 +687,7 @@ int main(int argc, char** argv) out[b * 2 ] = HEXADECA[(v >> 4) & 15]; out[b * 2 + 1] = HEXADECA[v & 15]; } + out[b*2] = '\0'; printf("%s\n", out); } } |