diff --git a/src/polyself.c b/src/polyself.c index 023b1f44a..df78a3bc4 100644 --- a/src/polyself.c +++ b/src/polyself.c @@ -300,7 +300,7 @@ newman() enmax = rounddiv((long)enmax * (long)rn1(4, 8), 10); for (i = 0; (u.ulevel = i) < newlvl; i++) enmax += newpw(); if (enmax < u.ulevel) enmax = u.ulevel; - u.uen = rounddiv((long)u.uen * (long)enmax, u.uenmax); + u.uen = rounddiv((long)u.uen * (long)enmax, ((u.uenmax < 1) ? 1 : u.uenmax)); u.uenmax = enmax; /* [should alignment record be tweaked too?] */