I'm debugging part of a large project in Visual Studio 2005, and stepping through the code line by line.
int speed = this->values.speed;
int ref = this->values.ref_speed;
After stepping past the first line, values.speed has a value of 61, but for some reason, speed is getting assigned the value 58. After the second line, values.ref_speed has a value of 58, but ref gets assigned the value 30.
When paused, you can see that the original values are in fact 61 and 58 respectively, but the values getting stored are different.
What is causing this behaviour?