diff options
Diffstat (limited to 'md5sum.c')
-rw-r--r-- | md5sum.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -901,7 +901,12 @@ int md5sum_main(int argc, | |||
901 | 901 | ||
902 | fail = md5_file (file, binary, md5buffer); | 902 | fail = md5_file (file, binary, md5buffer); |
903 | err |= fail; | 903 | err |= fail; |
904 | if (!fail) { | 904 | if (!fail && STREQ(file, "-")) { |
905 | size_t i; | ||
906 | for (i = 0; i < 16; ++i) | ||
907 | printf ("%02x", md5buffer[i]); | ||
908 | putchar ('\n'); | ||
909 | } else if (!fail) { | ||
905 | size_t i; | 910 | size_t i; |
906 | /* Output a leading backslash if the file name contains | 911 | /* Output a leading backslash if the file name contains |
907 | a newline or backslash. */ | 912 | a newline or backslash. */ |