Skip to content

Commit

Permalink
itermonarr comments
Browse files Browse the repository at this point in the history
Fix several typos/thinkos about 'itermonsiz' and remove an obsolete
remark about 'monarr'.
  • Loading branch information
PatR committed Jan 26, 2024
1 parent 39fb072 commit 1bfde1e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/mon.c
Original file line number Diff line number Diff line change
Expand Up @@ -4111,8 +4111,8 @@ static unsigned itermonsiz = 0; /* size in 'monst *' pointers */
void
alloc_itermonarr(unsigned count)
{
/* if count is 0 or bigger than itemarrsiz or much smaller than
itemarrsiz, release itermonarr (add reset itermarrsiz to 0) */
/* if count is 0 or bigger than itermonsiz or much smaller than
itermonsiz, release itermonarr (add reset itermonsiz to 0) */
if (!count || count > itermonsiz || count + 40 < itermonsiz) {
if (itermonarr)
free((genericptr_t) itermonarr), itermonarr = NULL;
Expand All @@ -4133,7 +4133,7 @@ alloc_itermonarr(unsigned count)
/* Iterate all monsters on the level, even dead or off-map ones, calling
bfunc() for each monster. If bfunc() returns TRUE, stop iterating.
If the game ends during the call to bfunc(), then freedynamicdata()
will need to free 'monarr' for us so we make a copy of it in struct g.
will free 'itermonarr'.
Safe for list deletions and insertions, and guarantees calling bfunc()
once per monster in fmon unless it returns TRUE (or game ends). */
Expand Down

0 comments on commit 1bfde1e

Please sign in to comment.