Files
nethack/include
nethack.allison abd3df2871 get_adjacent_loc()
use get_adjacent_loc() rather than getdir() directly for some things where
you want to ensure valid adjacent coordinates are returned

<email deleted> wrote:
>>> [...]
>>> I've noticed that the loot adjacent spot code doesn't have any
>>> isok(x,y) test, so will risk crashing if used at the edge of
>>> the screen (whether deliberately, or accidentally due to being
>>> confused or stunned when picking the direction).

>> Would this not be a problem elsewhere, such as use_leash() too?

> Yes, that looks like the same risk. getdir() doesn't validate
> that the <u.ux+u.dx, u.uy,u.dy> is safe and neither does m_at(),
> so their callers need to.
>
> I did manage to provoke a crash with #loot on the plane of earth,
> although an accidental case would be a lot less likely to happen.
2002-11-17 18:43:45 +00:00
..
2002-01-18 02:50:06 +00:00
2002-02-04 16:06:00 +00:00
2002-02-04 16:06:00 +00:00
2002-02-19 01:35:04 +00:00
2002-02-04 16:06:00 +00:00
2002-02-04 16:06:00 +00:00
2002-01-05 21:05:47 +00:00
2002-02-04 16:06:00 +00:00
2002-07-22 03:20:52 +00:00
2002-09-02 23:28:54 +00:00
2002-02-04 16:06:00 +00:00
2002-09-06 00:12:44 +00:00
2002-02-04 16:06:00 +00:00
2002-02-04 16:06:00 +00:00
2002-03-31 22:56:30 +00:00
2002-02-04 16:06:00 +00:00
2002-02-04 16:06:00 +00:00
2002-02-04 16:06:00 +00:00
2002-02-04 16:06:00 +00:00
2002-02-04 16:06:00 +00:00
2002-02-04 16:06:00 +00:00
2002-11-17 18:43:45 +00:00
2002-08-23 01:03:59 +00:00
2002-02-04 16:06:00 +00:00
2002-01-05 21:05:47 +00:00
2002-07-22 03:20:52 +00:00
2002-07-23 04:52:48 +00:00
2002-02-04 16:06:00 +00:00
2002-01-05 21:05:47 +00:00
2002-03-20 06:33:45 +00:00
2002-02-04 16:06:00 +00:00
2002-02-04 16:06:00 +00:00
2002-02-04 16:06:00 +00:00
2002-04-07 10:43:59 +00:00
2002-02-04 16:06:00 +00:00
2002-08-20 08:05:20 +00:00
2002-03-25 08:05:27 +00:00
2002-02-04 16:06:00 +00:00
2002-08-11 17:32:47 +00:00
2002-02-04 16:06:00 +00:00
2002-02-04 16:06:00 +00:00
2002-02-04 16:06:00 +00:00
2002-09-02 23:28:54 +00:00
2002-03-29 17:56:13 +00:00
2002-07-08 23:25:53 +00:00
2002-02-04 16:06:00 +00:00
2002-07-23 05:10:37 +00:00
2002-06-29 12:44:54 +00:00
2002-02-04 16:06:00 +00:00
2002-02-04 16:06:00 +00:00
2002-02-04 16:06:00 +00:00
2002-02-04 16:06:00 +00:00
2002-01-05 21:05:48 +00:00
2002-08-31 20:14:17 +00:00
2002-02-04 16:06:00 +00:00
2002-02-04 16:06:00 +00:00
2002-02-04 16:06:00 +00:00
2002-02-04 16:06:00 +00:00
2002-02-04 16:06:00 +00:00
2002-02-04 16:06:00 +00:00
2002-02-04 16:06:00 +00:00
2002-03-17 20:02:47 +00:00
2002-02-04 16:06:00 +00:00
2002-01-05 21:05:48 +00:00
2002-02-04 16:06:00 +00:00
2002-02-04 16:06:00 +00:00
2002-03-02 22:43:39 +00:00
2002-02-04 16:06:00 +00:00
2002-02-04 16:06:00 +00:00
2002-02-04 16:06:00 +00:00
2002-07-22 03:20:52 +00:00
2002-02-04 16:06:00 +00:00
2002-02-04 16:06:00 +00:00
2002-08-23 01:03:59 +00:00
2002-02-04 16:06:00 +00:00
2002-02-04 16:06:00 +00:00
2002-03-17 20:02:47 +00:00
2002-02-04 16:06:00 +00:00
2002-02-04 16:06:00 +00:00
2002-02-04 16:06:00 +00:00
2002-02-04 16:06:00 +00:00