[comp.sources.games.bugs] Spacewar bug

jjd@chinet.UUCP (Joe Durnavich) (06/10/88)

I got spacewar to compile and run on an NCR Tower 32/600 ok except
for one bug.  The spacecraft functioned correctly, but the universe
seem clustered around coordinates 0, 0, 0.  I traced the problem
to the vdiff function in mutils.c.

To fix it, I changed this:

	for (i=0;i++<3;)
		*cvec++ = *avec++ - *bvec++;

To this:

	for (i=0;i++<3;)
	{
		*cvec = *avec - *bvec;
		avec++;
		bvec++;
		cvec++;
	}

----------------
Joe Durnavich
ihnp4!chinet!jjd