]> granicus.if.org Git - nethack/commit
Fix: IS_SUBROOM_INDEX range
authorMichael Meyer <me@entrez.cc>
Thu, 25 Aug 2022 01:38:56 +0000 (21:38 -0400)
committerPatR <rankin@nethack.org>
Wed, 28 Sep 2022 21:11:05 +0000 (14:11 -0700)
commitd1f4e7df85c8385af2b0a464ba6976f45bccf776
tree77b14223c99a44b6451e76c190703a24fa888dd4
parentd74791f4a2030de732ad264fe76943fa180da442
Fix: IS_SUBROOM_INDEX range

The macro (currently unused, I think) for checking whether a particular
index designates a subroom was off by one on the maximum allowable
value.

Because of the dedicated extra space for the g.rooms array terminator
flag (hx == -1), subroom indices in g.rooms are set out in the range
[MAXNROFROOMS+1, MAXNROFROOMS*2], inclusive.

Also some minor formatting tweaks.
include/mkroom.h
src/mklev.c