DEBUGFILES

Fetching a value of DEBUGFILES from the environment to enable
debugpline() messages was intended to operate in wizard mode only
but that wasn't enforced.
This commit is contained in:
PatR
2024-06-04 14:53:17 -07:00
parent cf2a97dea4
commit 8652262105
2 changed files with 6 additions and 0 deletions

View File

@@ -1414,6 +1414,7 @@ shopkeepers magnified the cost of shop items used up as a group; normally
the tile for Ixoth (knight's quest nemesis) depicted a demon rather than a
dragon; change it to be a red dragon
untrapping containers or doors gives some experience
only honor DEBUGFILES (for activating debugpline() calls) when in wizard mode
Fixes to 3.7.0-x General Problems Exposed Via git Repository

View File

@@ -4519,6 +4519,11 @@ debugcore(const char *filename, boolean wildcards)
{
const char *debugfiles, *p;
/* debugpline() messages might disclose information that the player
doesn't normally get to see, so only display them in wizard mode */
if (!wizard)
return FALSE;
if (!filename || !*filename)
return FALSE; /* sanity precaution */