skip comment lines when checking hashes

[skip ci]
This commit is contained in:
Steffen Jaeckel 2017-09-20 17:43:07 +02:00
parent 9a83397376
commit a278f72659

View File

@ -90,6 +90,10 @@ static void check_file(int argn, int argc, char **argv)
int tries, n;
unsigned long hash_len, w, x;
char* space = strstr(s, " ");
/* skip lines with comments */
if (buf[0] == '#') continue;
if (space == NULL) {
fprintf(stderr, "%s: no properly formatted checksum lines found\n", hashsum);
goto ERR;