I have the following (in a 16-bit environment)
char * myFunc(char *lbuf, int_32 MyLong)
sprintf(buffer, "%6.6s%05d", MyName, MyLong)
|The above statement appears to me to be wrong, as MyLong is a long and I'm using a 16-bit format spec to output it.
My question is: can such a bug cause random failures in this functiion? By that, I mean that when the calling function tried to output MyFunc's returnvalue to a text file, it would write nothing to the file.
This behavior was RANDOM: for example, I'd run the program once, it would work. Then I would REMOVE a line of code from the calling function THAT WASN'T EVEN EXECUTED IN THAT RUN OF THE PROGRM, and it would fail.