From: jwalz Date: Fri, 15 Mar 2002 22:07:24 +0000 (+0000) Subject: pointed out a possible infinite loop here. X-Git-Tag: MOVE2GIT~2965 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=579360ed93f36de23e4c110593037b26b0e82794;p=nethack pointed out a possible infinite loop here. --- diff --git a/src/spell.c b/src/spell.c index 4b3ef429d..ab72822e0 100644 --- a/src/spell.c +++ b/src/spell.c @@ -281,7 +281,7 @@ learn() boolean costly = TRUE; /* JDS: lenses give 50% faster reading; 33% smaller read time */ - if (ublindf && ublindf->otyp == LENSES && rn2(2)) delay++; + if (delay && ublindf && ublindf->otyp == LENSES && rn2(2)) delay++; if (delay) { /* not if (delay++), so at end delay == 0 */ delay++; return(1); /* still busy */