memory #stats

obj->oextra->omonst might contain monst->mextra plus mextra->edog, &c.
That was being ignored when summing up memory allocated for objects.
This commit is contained in:
PatR
2018-12-28 15:06:45 -08:00
parent fc504dfa89
commit 5846aee283
+2 -2
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 cmd.c $NHDT-Date: 1545128652 2018/12/18 10:24:12 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.322 $ */ /* NetHack 3.6 cmd.c $NHDT-Date: 1546038393 2018/12/28 23:06:33 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.323 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2013. */ /*-Copyright (c) Robert Patrick Rankin, 2013. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -3671,7 +3671,7 @@ struct obj *otmp;
if (ONAME(otmp)) if (ONAME(otmp))
sz += (int) strlen(ONAME(otmp)) + 1; sz += (int) strlen(ONAME(otmp)) + 1;
if (OMONST(otmp)) if (OMONST(otmp))
sz += (int) sizeof(struct monst); sz += size_monst(OMONST(otmp), FALSE);
if (OMID(otmp)) if (OMID(otmp))
sz += (int) sizeof (unsigned); sz += (int) sizeof (unsigned);
if (OLONG(otmp)) if (OLONG(otmp))