New answers tagged


This: sprintf(stringBuffer, "Calibration accomplished with value: %d", calibrationValue); is a buffer overflow: the function sprintf() is writing a 40-byte string into a 30-byte buffer. Whatever happens to lie in memory right after the buffer will be overwritten by sprintf(). Apparently this happened to be calibrationValue. You should use snprintf(...

Top 50 recent answers are included