mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-10-06 09:53:00 +02:00
Corrected the "property" command parsing, which had a print statement
without an argument, resulting in random things getting printed to the output when a property name does not exist.
This commit is contained in:
+1
-1
@@ -1296,7 +1296,7 @@ CmdCellname(w, cmd)
|
||||
if (cellDef == (CellDef *) NULL)
|
||||
TxError("Unknown cell %s\n", cellname);
|
||||
else
|
||||
CmdDoProperty(cellDef, cmd, 3 + ((dolist) ? 1 : 0));
|
||||
CmdDoProperty(cellDef, cmd, 2 + ((dolist) ? 1 : 0));
|
||||
break;
|
||||
|
||||
case IDX_DELETE:
|
||||
|
||||
+2
-1
@@ -2326,6 +2326,7 @@ CmdDoProperty(def, cmd, argstart)
|
||||
/* print all properties and their values */
|
||||
DBPropEnum(def, printPropertiesFunc);
|
||||
}
|
||||
|
||||
else if (locargc == 2)
|
||||
{
|
||||
/* print the value of the indicated property */
|
||||
@@ -2342,7 +2343,7 @@ CmdDoProperty(def, cmd, argstart)
|
||||
/* just return NULL if the property was not found. */
|
||||
if (strcmp(cmd->tx_argv[1], "list"))
|
||||
#endif
|
||||
TxError("Property name %s is not defined\n");
|
||||
TxError("Property name \"%s\" is not defined\n", cmd->tx_argv[1]);
|
||||
}
|
||||
}
|
||||
else if (locargc == 3)
|
||||
|
||||
Reference in New Issue
Block a user