This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

sprintf replaces % in string by ERROR

const char Unitstring[]="%_VOL";
char Buffer[1024];

sprintf(Buffer,"Unit: %s",Unitstring);

ends up having "Unit: ERRORVOL" instead of "Unit: %_VOL" in Buffer.
I would expect this with

sprintf(Buffer,"Unit: %_VOL");
instead
sprintf(Buffer,"Unit: %%_VOL");

Parents Reply Children
No data