Skip to content

Commit b441d66

Browse files
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.
1 parent 81b5ac2 commit b441d66

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

commands/CmdCD.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1296,7 +1296,7 @@ CmdCellname(w, cmd)
12961296
if (cellDef == (CellDef *) NULL)
12971297
TxError("Unknown cell %s\n", cellname);
12981298
else
1299-
CmdDoProperty(cellDef, cmd, 3 + ((dolist) ? 1 : 0));
1299+
CmdDoProperty(cellDef, cmd, 2 + ((dolist) ? 1 : 0));
13001300
break;
13011301

13021302
case IDX_DELETE:

commands/CmdLQ.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -2326,6 +2326,7 @@ CmdDoProperty(def, cmd, argstart)
23262326
/* print all properties and their values */
23272327
DBPropEnum(def, printPropertiesFunc);
23282328
}
2329+
23292330
else if (locargc == 2)
23302331
{
23312332
/* print the value of the indicated property */
@@ -2342,7 +2343,7 @@ CmdDoProperty(def, cmd, argstart)
23422343
/* just return NULL if the property was not found. */
23432344
if (strcmp(cmd->tx_argv[1], "list"))
23442345
#endif
2345-
TxError("Property name %s is not defined\n");
2346+
TxError("Property name \"%s\" is not defined\n", cmd->tx_argv[1]);
23462347
}
23472348
}
23482349
else if (locargc == 3)

0 commit comments

Comments
 (0)