]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
repo_arch: fix bad space skipping code
authorMichael Schroeder <mls@suse.de>
Fri, 25 Jul 2014 15:52:55 +0000 (17:52 +0200)
committerMichael Schroeder <mls@suse.de>
Fri, 25 Jul 2014 15:52:55 +0000 (17:52 +0200)
Credits to dcb314 for noticing.

ext/repo_arch.c

index 394e8b5ed6a2fcdc50dac25e7f929d0c622a3c8b..a0c45ce4785b962fd7e4b21acc42bdbfce279f3f 100644 (file)
@@ -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')