diff options
Diffstat (limited to '')
-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 87480ea..c955d52 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); } } |