AnsweredAssumed Answered

sprintf not functioning correctly

Question asked by Christopher Hess on Jul 17, 2019
Latest reply on Jul 18, 2019 by Christopher Hess

I am working on a project in MCUXpresso that was originally written in code warrior. I am having difficulty using a sprintf() function and the problem seems to be with MCUXpresso. I have checked that I am using the original compiler and I am using the Redlib semihost C library.  Below is the code:


char tString[50];

float current = 1.2;

sprintf(tString, "%3.0f",current);



After stepping through this code, the first three entries of tString are 32 ' '.  What could be causing this issue?