From 03bbc544b2f26a3248ce4ca2f958edbb71e24746 Mon Sep 17 00:00:00 2001 From: "R. Timothy Edwards" Date: Wed, 11 Mar 2026 16:35:52 -0400 Subject: [PATCH] Fixed a long-standing error that had gone unnoticed that prevents the use of "property list " to return NULL if is undefined, instead of printing an error message that cannot be suppressed. Scripts which wish to test whether or not a bounding box exists will of course want the "quiet" version of the command. --- commands/CmdLQ.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/commands/CmdLQ.c b/commands/CmdLQ.c index 54dcab53..6bf3ed1f 100644 --- a/commands/CmdLQ.c +++ b/commands/CmdLQ.c @@ -2326,7 +2326,7 @@ CmdDoProperty( { PropertyRecord *proprec; char *value; - bool propfound; + bool propfound, dolist; int proptype, proplen, propvalue, i; dlong dvalue; int locargc = cmd->tx_argc - argstart + 1; @@ -2345,6 +2345,20 @@ CmdDoProperty( "string", "integer", "dimension", "double", "plane", "compat", NULL }; + /* If the first keyword is "list", then set dolist and increment + * the starting argument position. + */ + dolist = FALSE; + if (locargc > 1) + { + if (!strcmp(cmd->tx_argv[argstart], "list")) + { + dolist = TRUE; + locargc--; + argstart++; + } + } + /* If a property type is given, parse it and then strip it from * the arguments list. */ @@ -2498,9 +2512,9 @@ CmdDoProperty( #ifdef MAGIC_WRAPPER /* If the command was "cellname list property ...", then */ /* just return NULL if the property was not found. */ - if (strcmp(cmd->tx_argv[1], "list")) + if (!dolist) #endif - TxError("Property name \"%s\" is not defined\n", cmd->tx_argv[1]); + TxError("Property name \"%s\" is not defined\n", cmd->tx_argv[argstart]); } } else if (locargc >= 3)