1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-26 11:52:25 +00:00

Fix crash in xrdopt. (#260)

In 85fa89ba88, I removed 2 entries
from a table, but didn't update the count. This leads to a
`SIGSEGV`.
This commit is contained in:
Bruce Mitchener
2021-01-21 09:19:29 +07:00
committed by GitHub
parent 45d67305e7
commit 819f1c6c0a

View File

@@ -33,7 +33,6 @@
#include "maindefs.h"
XrmDatabase commandlineDB, applicationDB, serverDB, homeDB, rDB;
int opTableEntries = 33;
extern int LispWindowRequestedX, LispWindowRequestedY;
extern unsigned LispWindowRequestedWidth, LispWindowRequestedHeight;
@@ -190,7 +189,7 @@ void read_Xoption(int *argc, char *argv[])
/* JDS 12/20/01: app name should always be "ldex", not what's in argv?? */
XrmParseCommand(&commandlineDB, opTable, opTableEntries, argv[0], argc, argv);
#endif
XrmParseCommand(&commandlineDB, opTable, opTableEntries, "ldex", argc, argv);
XrmParseCommand(&commandlineDB, opTable, sizeof(opTable) / sizeof(opTable[0]), "ldex", argc, argv);
if (XrmGetResource(commandlineDB, "ldex.help", "Ldex.Help", str_type, &value) == True) {
print_Xusage(argv[0]);