title: sscanf missing a string after %[^-]s match
body: <p>I have a simple program using <code>sscanf</code>.
  The problem I am having is that after matching <code>%[^-]s</code>, <code>sscanf</code> seems to just stop matching.</p>
  
  <p>Here is simple code to see what I mean. The <code>%s</code> match after <code>%[^-]s %s</code> is totally ignored.</p>
  
  <p>NOTE: I need that <code>%[^-]s</code> as I need my program to match both of the possible strings.</p>
  
  <p>NOTE 2: I know the code is totally insecure etc. This is just an example!  </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main(void) {
      int matches;
      int num1, num2, num3, num4;
      char *s1[10];
      char *s2[10];
      char *s3[40];
      char *s4[50];
      char *s5[50];
      char *s6[50];
      char *s7[50];
  
      char fileTest[] = "29 0 8:4 / / rw,relatime shared:1 - ext4 /dev/sda4 rw,errors=remount-ro";
      // char fileTest[] = "160 48 179:56 /inte /var/oil/gaol/org.something.org/media/internal ro,nosuid,relatime - ext4 /dev/mmccc rw,data=ordered";
  
      matches = sscanf(fileTest, "%d %d %d:%d %s %s %[^-]s %s",
                       &amp;num1, &amp;num2, &amp;num3, &amp;num4, s1, s2, s3, s4);
  
      printf("matches: %d\n", matches);
      printf("num1: %d\n", num1);
      printf("num2: %d\n", num2);
      printf("num3: %d\n", num3);
      printf("num4: %d\n", num4);
      printf("s1: %s\n", s1);
      printf("s2: %s\n", s2);
      printf("s3: %s\n", s3);
      printf("s4: %s\n", s4);
  
      return 0;
  }
  </code></pre>