Fix recently introduced memory corrupter in path()

path() failed to normalize coordinate argument for deltx() and
delty().  This could subscript map[] and mapbuf[] out of bounds.
Broken in commit 3ca88271.
This commit is contained in:
Markus Armbruster 2008-08-23 10:42:22 -04:00
parent 99284a9beb
commit 1ac95e0ed7

View file

@ -103,8 +103,8 @@ path(void)
memcpy(&map[delty(&ns.range, cy)][deltx(&ns.range, cx) * 2],
routech[i][0],
3);
cx += diroff[i][0];
cy += diroff[i][1];
cx = xnorm(cx + diroff[i][0]);
cy = ynorm(cy + diroff[i][1]);
}
border(&relrange, " ", " ");
while (nxtsct(&ns, &sect)) {