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.
This commit is contained in:
nethack.rankin
2002-03-13 11:22:03 +00:00
parent 9084aebe11
commit 57d8a85e50
+3 -3
View File
@@ -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. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* 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 */ /* rindex always succeeds due to code in prior block */
int len = (rindex(protofile, '-') - protofile) + 1; int len = (rindex(protofile, '-') - protofile) + 1;
while (*ep) { while (ep && *ep) {
if (!strncmp(ep, protofile, len)) { if (!strncmp(ep, protofile, len)) {
int pick = atoi(ep + len); int pick = atoi(ep + len);
/* use choice only if valid */ /* use choice only if valid */
@@ -544,7 +544,7 @@ register const char *s;
if(load_special(protofile)) { if(load_special(protofile)) {
fixup_special(); fixup_special();
/* some levels can end up with monsters /* some levels can end up with monsters
on dead mon list, including light source monsters */ on dead mon list, including light source monsters */
dmonsfree(); dmonsfree();
return; /* no mazification right now */ return; /* no mazification right now */
} }