As you can see, the value of buffer[0] changes when the line sprintf(tittle, %03d.jpg", images);
, which has nothing to do with the buffer. All of the values in buffer are changed. I went through my code a thousand times, and I finally found out this. It's really frustrating! Any explanations?
1 Answer
I reserved only 4 bytes for the title while I needed 8. The buffer was overwritten as a result of this.