Two small tweaks on plot filename behavior: (1) "plot svg" without

a filename causes an error instead of generating a trash filename
or crashing, while (2) "plot pnm" with a filename that has the ".pnm"
extension does not add another ".pnm" extension to the end of it.
This commit is contained in:
Tim Edwards
2023-10-17 20:01:39 -04:00
parent fdcc178bcd
commit 98f3b39dc2
3 changed files with 25 additions and 4 deletions
+2 -2
View File
@@ -269,9 +269,9 @@ CmdPlot(w, cmd)
#if defined(HAVE_LIBCAIRO) && defined(MAGIC_WRAPPER)
case PLOTSVG:
if (cmd->tx_argc > 3)
if (cmd->tx_argc != 3)
{
TxError("Too many arguments:\n plot %s\n",
TxError("Wrong number of arguments:\n plot %s\n",
cmdPlotOption[PLOTSVG]);
return;
}