AnsweredAssumed Answered

sscanf Inconsistencies

Question asked by weblar on Jun 13, 2012
Latest reply on Jun 13, 2012 by Martin Kojtal

I'm trying to use the MQX sscanf implementation however I'm coming up with some issues.

 

I have the following function call...

 

char * key = (char *)calloc(32, sizeof(char));char * value = (char *)calloc(32, sizeof(char));int_32 matches = sscanf("Enabled = Y", "%[^=]=%s", key, value);// matches = 0// key = nothing// value = nothing

 An identical function call from Visual C returns 2 and both key and value contain "Enabled" and "Y" respectively.

 

Am I missing something?

Outcomes