diff --git a/src/allmain.c b/src/allmain.c index 2b006bf63..fa9e03ac6 100644 --- a/src/allmain.c +++ b/src/allmain.c @@ -578,7 +578,7 @@ newgame() context.tribute.enabled = TRUE; /* turn on 3.6 tributes */ context.tribute.tributesz = sizeof(struct tribute_info); - for (i = 0; i < NUMMONS; i++) + for (i = LOW_PM; i < NUMMONS; i++) mvitals[i].mvflags = mons[i].geno & G_NOCORPSE; init_objects(); /* must be before u_init() */ diff --git a/src/sp_lev.c b/src/sp_lev.c index 179d45fa3..9ef1dcf46 100644 --- a/src/sp_lev.c +++ b/src/sp_lev.c @@ -3050,6 +3050,7 @@ struct sp_coder *coder; while ((nparams++ < (SP_O_V_END + 1)) && (OV_typ(varparam) == SPOVAR_INT) && (OV_i(varparam) >= 0) && (OV_i(varparam) < SP_O_V_END)) { struct opvar *parm; + OV_pop(parm); switch (OV_i(varparam)) { case SP_O_V_NAME: @@ -3061,11 +3062,12 @@ struct sp_coder *coder; char monclass = SP_MONST_CLASS(OV_i(parm)); int monid = SP_MONST_PM(OV_i(parm)); - if (monid >= 0 && monid < NUMMONS) { + if (monid >= LOW_PM && monid < NUMMONS) { tmpobj.corpsenm = monid; break; /* we're done! */ } else { struct permonst *pm = (struct permonst *) 0; + if (def_char_to_monclass(monclass) != MAXMCLASSES) { pm = mkclass(def_char_to_monclass(monclass), G_NOGEN); } else {