]> granicus.if.org Git - nethack/commitdiff
<Someone> pointed out a possible infinite loop here.
authorjwalz <jwalz>
Fri, 15 Mar 2002 22:07:24 +0000 (22:07 +0000)
committerjwalz <jwalz>
Fri, 15 Mar 2002 22:07:24 +0000 (22:07 +0000)
src/spell.c

index 4b3ef429d947a3a7fb613ee530a2a458bb203310..ab72822e0531bf328f542f2a74e0d3f194438444 100644 (file)
@@ -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 */