See this commit: 9d48405fa5669b2419067dd0522512c5d5a77237 (Detect and work around the 'knight's move' LOS hack when doing FOV).
Calls to cave_iswall(c, x + something, y + something) are suspicious for two reasons: first, the function declaration is cave_iswall(struct cave *c, int y, int x), which implies that y should go before x; second, the two parameters surely can go out of bounds when you inspect a grid that is near the border of the level, so maybe add some bound checking somewhere.
Calls to cave_iswall(c, x + something, y + something) are suspicious for two reasons: first, the function declaration is cave_iswall(struct cave *c, int y, int x), which implies that y should go before x; second, the two parameters surely can go out of bounds when you inspect a grid that is near the border of the level, so maybe add some bound checking somewhere.
Comment