title: sscanf while reading 2 integers, extracts 0 for first digit
body: <p>I am reading formatted data with</p>
  
  <p><code>sscanf(buf,"%d %d",&amp;a,&amp;b)</code>;</p>
  
  <p><code>data format = (unsigned short SPACE unsigned short)</code>;</p>
  
  <p>but when i read it only successfully extract 2nd integer value from buffer for first it extracts 0. I am checking with (<code>printf("nRecvd %d and %d",a,b)</code>) I am reading from socket and I verified buffer values. All is ok untill sscanf.</p>
  
  <pre><code>char buf[MAXBUFL];
  unsigned short a, b;
  if (sscanf(buf,"%d %d",&amp;a,&amp;b) != 2)
        snprintf (buf, sizeof(buf), "data error\r\n");
  
      else
        {
        printf("\nRecvd %d and %d",a,b);}
  </code></pre>
  
  <p>Any suggestions?</p>