Subtracting to before the first item in an array is apparently asking
for trouble even if I don't intend to use the value.
git-svn-id: https://s.snth.net/svn/neverball/trunk@3325
78b8d119-cf0a-0410-b17c-
f493084dd1d7
for (bi = 0; bi < fp->bc; bi++)
{
struct s_body *bp = fp->bv + bi;
- struct s_path *pp = fp->pv + bp->pi;
- if (bp->pi < 0)
- continue;
+ if (bp->pi >= 0)
+ {
+ struct s_path *pp = fp->pv + bp->pi;
- if (!pp->f)
- continue;
+ if (!pp->f)
+ continue;
- if (bp->t + st > pp->t)
- st = pp->t - bp->t;
+ if (bp->t + st > pp->t)
+ st = pp->t - bp->t;
+ }
}
nt = sol_test_file(st, P, V, up, fp);