]> granicus.if.org Git - nethack/commitdiff
Fix: stairs could generate in themed rooms if others were available
authorcopperwater <aosdict@gmail.com>
Sun, 24 May 2020 01:38:03 +0000 (21:38 -0400)
committerPasi Kallinen <paxed@alt.org>
Mon, 28 Sep 2020 17:00:12 +0000 (20:00 +0300)
This is a simple && vs || bug. The clear intention of the code is that
stairs aren't supposed to generate in themed rooms unless there is no
other choice.

Fixes #348

src/mklev.c

index 8a6e5f4c7d2322e3ff6923912d5acbca810c4b90..61dd00ef04789106804c3b764a03ce41ac983227 100644 (file)
@@ -1661,7 +1661,7 @@ int phase;
             && ((croom != g.dnstairs_room && croom != g.upstairs_room)
                 || phase < 1)
             && (croom->rtype == OROOM
-                || ((phase < 2) || croom->rtype == THEMEROOM)));
+                || ((phase < 2) && croom->rtype == THEMEROOM)));
 }
 
 /* find a good room to generate an up or down stairs in */