fix last ':' checking patch - source and patch lines cna have #'s!

CVS patchset: 403
CVS date: 1996/02/22 20:28:19
This commit is contained in:
root 1996-02-22 20:28:19 +00:00
parent 787d0ca102
commit e10aa661f3
1 changed files with 8 additions and 3 deletions

View File

@ -470,10 +470,15 @@ static int find_preamble_line(char *line, char **s)
}
if (!p->token) return 0;
*s = line + p->len;
*s += strspn(*s, " \t");
if (**s != ':') {
return 0;
/* Unless this is a source or a patch, a ':' better be next */
if (p->tag != RPMTAG_SOURCE && p->tag != RPMTAG_PATCH) {
*s += strspn(*s, " \t");
if (**s != ':') {
return 0;
}
}
*s += strspn(*s, ": \t");
return p->tag;
}