A bug was recently pointed out to me in stock SWR space code ( and in SWRIP's ). If a player types "course inf inf inf" it will actually set the ship's heading to 'inf inf inf.' Apparently, atof("inf") returns infinity. This will lead to the ship having a position of nan the next time it's position updates.
I fixed it with this:
if ( ship->hx == atof("inf") )
ship->hx = 0;
if ( ship->hy == atof("inf") )
ship->hy = 0;
if ( ship->hz == atof("inf") )
ship->hz = 0;
Put just before the line:
change = sqrt (ship->hx * ship->hx + ship->hy * ship->hy + ship->hz * ship->hz);
which is line 409 in stock SWR 1.0.
I started by checking for it in do_trajectory, but decided I'd catch any situation if I put it here.