From: Michael Schroeder Date: Fri, 25 Jul 2014 15:52:55 +0000 (+0200) Subject: repo_arch: fix bad space skipping code X-Git-Tag: 0.6.5~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c64caa35cb614fbae38672b4fe9fd52e3793586;p=thirdparty%2Flibsolv.git repo_arch: fix bad space skipping code Credits to dcb314 for noticing. --- diff --git a/ext/repo_arch.c b/ext/repo_arch.c index 394e8b5e..a0c45ce4 100644 --- a/ext/repo_arch.c +++ b/ext/repo_arch.c @@ -294,13 +294,13 @@ adddep(Repo *repo, Offset olddeps, char *line) char *p; Id id; - while (*line == ' ' && *line == '\t') + while (*line == ' ' || *line == '\t') line++; p = line; while (*p && *p != ' ' && *p != '\t' && *p != '<' && *p != '=' && *p != '>') p++; id = pool_strn2id(pool, line, p - line, 1); - while (*p == ' ' && *p == '\t') + while (*p == ' ' || *p == '\t') p++; if (*p == '<' || *p == '=' || *p == '>') { @@ -316,7 +316,7 @@ adddep(Repo *repo, Offset olddeps, char *line) else break; } - while (*p == ' ' && *p == '\t') + while (*p == ' ' || *p == '\t') p++; line = p; while (*p && *p != ' ' && *p != '\t')