CL_FootSteps "starts over" by calling itself recursively. Since C does not have explicit tail calls, this can lead to a stack overflow. Change it to use 'goto'.