When there is no model found, and we have an m devices,

set the number of nodes to 4. This has to be fixed (find
a way to detect the number of nodes automatically).
This commit is contained in:
Holger Vogt 2020-12-15 23:12:31 +01:00
parent b0a2ab5729
commit b1d062668c
1 changed files with 5 additions and 1 deletions

View File

@ -1389,7 +1389,11 @@ translate(struct card *deck, char *formal, char *actual, char *scname, const cha
tfree(name);
bxx_putc(&buffer, ' ');
nnodes = numnodes(c->line, subs, modnames);
/* FIXME anothet hack: if no models found for m devices, set number of nodes to 4 */
if (!modnames && *(c->line) == 'm')
nnodes = 4;
else
nnodes = numnodes(c->line, subs, modnames);
while (--nnodes >= 0) {
name = gettok_node(&s);
if (name == NULL) {