Skip to content

Commit a278f72

Browse files
committed
skip comment lines when checking hashes
[skip ci]
1 parent 9a83397 commit a278f72

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

demos/hashsum.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ static void check_file(int argn, int argc, char **argv)
9090
int tries, n;
9191
unsigned long hash_len, w, x;
9292
char* space = strstr(s, " ");
93+
94+
/* skip lines with comments */
95+
if (buf[0] == '#') continue;
96+
9397
if (space == NULL) {
9498
fprintf(stderr, "%s: no properly formatted checksum lines found\n", hashsum);
9599
goto ERR;

0 commit comments

Comments
 (0)