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:
parent
99284a9beb
commit
1ac95e0ed7
1 changed files with 2 additions and 2 deletions
|
@ -103,8 +103,8 @@ path(void)
|
||||||
memcpy(&map[delty(&ns.range, cy)][deltx(&ns.range, cx) * 2],
|
memcpy(&map[delty(&ns.range, cy)][deltx(&ns.range, cx) * 2],
|
||||||
routech[i][0],
|
routech[i][0],
|
||||||
3);
|
3);
|
||||||
cx += diroff[i][0];
|
cx = xnorm(cx + diroff[i][0]);
|
||||||
cy += diroff[i][1];
|
cy = ynorm(cy + diroff[i][1]);
|
||||||
}
|
}
|
||||||
border(&relrange, " ", " ");
|
border(&relrange, " ", " ");
|
||||||
while (nxtsct(&ns, §)) {
|
while (nxtsct(&ns, §)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue