summaryrefslogtreecommitdiffstats
path: root/games/hack/hack.trap.c
diff options
context:
space:
mode:
authorbillf <billf@FreeBSD.org>1999-09-07 06:00:03 +0000
committerbillf <billf@FreeBSD.org>1999-09-07 06:00:03 +0000
commit3e1d9f25c8a992fb915d18ffaccb3a266e8ad0a4 (patch)
treea392a79dd376bd7e8273e85fac9e7af604437b66 /games/hack/hack.trap.c
parent33adb981d4021526b69c31fe25c2fc524378289f (diff)
downloadFreeBSD-src-3e1d9f25c8a992fb915d18ffaccb3a266e8ad0a4.zip
FreeBSD-src-3e1d9f25c8a992fb915d18ffaccb3a266e8ad0a4.tar.gz
Avoid ambigious if() if() else().
Diffstat (limited to 'games/hack/hack.trap.c')
-rw-r--r--games/hack/hack.trap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/games/hack/hack.trap.c b/games/hack/hack.trap.c
index e426dd1..7ec0f93 100644
--- a/games/hack/hack.trap.c
+++ b/games/hack/hack.trap.c
@@ -391,8 +391,9 @@ register int newlevel;
newlevel = atoi(buf);
} else {
newlevel = 5 + rn2(20); /* 5 - 24 */
- if(dlevel == newlevel)
+ if(dlevel == newlevel) {
if(!xdnstair) newlevel--; else newlevel++;
+ }
}
if(newlevel >= 30) {
if(newlevel > MAXLEVEL) newlevel = MAXLEVEL;
OpenPOWER on IntegriCloud