With the new version of 4coder, a bug showed up.
One of my static variables is erased by the following code (line 1331):
1 2 3 4 5 6 | Casey_Scroll_Velocity casey_scroll_velocity_[16] = {0}; Casey_Scroll_Velocity *casey_scroll_velocity = casey_scroll_velocity_; SCROLL_RULE_SIG(casey_smooth_scroll_rule){ float dt = 1.0f/60.0f; // TODO(casey): Why do I not get the timestep here? Casey_Scroll_Velocity *velocity = casey_scroll_velocity + view_id; |
It seems that 4coder has: 1 <= view_id <= 16.
When view_id is 16, casey_scroll_velocity_ overflows.
Here is how it is done in 4coder_default_include.cpp (line 732):
1 2 | Scroll_Velocity scroll_velocity_[16] = {0}; Scroll_Velocity *scroll_velocity = scroll_velocity_ - 1; |
This fixed the bug:
1 | Casey_Scroll_Velocity *casey_scroll_velocity = casey_scroll_velocity_ - 1; |