Quantcast
Channel: Keil Discussion Forum RSS Feed
Viewing all articles
Browse latest Browse all 3049

C51: Bug in C51 run-time library: sprintf (5 Replies)

$
0
0
Hello, I think I have found a bug in the sprintf function of the C51 run-time library: If I call sprintf to substitute an integer ("%d", "%u" or "%i") from a one byte variable sprintf will write garbage into the array. Here a simple example: unsigned char xdata testArray[5] = ""; // testArray = {0x00, 0x00, 0x00, 0x00, 0x00} unsigned char xdata oneByteVariable = 1; sprintf(testArra

Viewing all articles
Browse latest Browse all 3049

Trending Articles