nextx = comx;
nexty = comy;
/* main move loop */
- for (ll = 1; ll <= nsteps; ll++) {
+ for (ll = 0; ll < nsteps; ll++) {
#ifdef DEBUG
if (idebug) {
- prout("%d", ll);
+ prout("%d", ll+1);
}
#endif
/* Check if preferred position available */
{
int i, i2, j, ideltax, ideltay, ibqx, ibqy, sx, sy, ifindit, iwhichb;
int iqx, iqy;
- int basetbl[BASEMAX];
- double bdist[BASEMAX];
+ int basetbl[BASEMAX+1];
+ double bdist[BASEMAX+1];
int flag;
#ifdef DEBUG
if (idebug) prout("SCOM");