From: nethack.rankin Date: Wed, 13 Mar 2002 11:22:03 +0000 (+0000) Subject: fix wizard mode crash (SPLEVTYPE) X-Git-Tag: MOVE2GIT~2969 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=57d8a85e506a1199003fe15e9953402205f633d7;p=nethack fix wizard mode crash (SPLEVTYPE) Set SPLEVLTYPE to "soko1-1"; visit soko4-* (or minetown) on the way there; oops: access violation from deferencing a null pointer. --- diff --git a/src/mkmaze.c b/src/mkmaze.c index 9448b584e..ca6dce51f 100644 --- a/src/mkmaze.c +++ b/src/mkmaze.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)mkmaze.c 3.4 2001/09/06 */ +/* SCCS Id: @(#)mkmaze.c 3.4 2002/03/12 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -523,7 +523,7 @@ register const char *s; /* rindex always succeeds due to code in prior block */ int len = (rindex(protofile, '-') - protofile) + 1; - while (*ep) { + while (ep && *ep) { if (!strncmp(ep, protofile, len)) { int pick = atoi(ep + len); /* use choice only if valid */ @@ -544,7 +544,7 @@ register const char *s; if(load_special(protofile)) { fixup_special(); /* some levels can end up with monsters - on dead mon list, including light source monsters */ + on dead mon list, including light source monsters */ dmonsfree(); return; /* no mazification right now */ }