I'm testing a CLI ball animation in C++. The ball starts at y_pos 20, with velocity 5 and ground 200. An endless loop subtracts velocity from y_pos, then prints the position only if y_pos is greater than or equal to ground.
I expect that condition to stay false, but I eventually see a huge positive number. In the debugger, the position just decreases. What am I missing?
6f+mapgrommet_493:
That is integer overflow, not a buffer overflow. No buffer is involved in this example.