If have serveral strcmp statements
Originally I had them all like this.
if (strcmp("GPGGA",gcBuffer) == 0)
{
gpFieldPtr=(PGM_P) GGA;
}
It would execute the pointer assignment on each of the 8 statements
I changed them to
lnResult = strcmp("GPGLL",gcBuffer);
if (lnResult == 0)
{
gpFieldPtr=GLL;
}
So I could see the result code of strcmp. This time it skipped the 1st 3
ok but then started doing the assignments. And when it got to the strcmp
that should have matched, lnResult was not 0 and yet it did the
assignment anyhow.
Anyone have any idea why?Message
Strcmp() problem stepping through AVR Studio
2005-04-11 by wbounce