Browse Source

Allow adequate size for copying.

Add the missing character string to fprintf.
pre-master-46
Holger Vogt 4 years ago
parent
commit
3bac1ffabe
  1. 4
      src/frontend/inpc_probe.c

4
src/frontend/inpc_probe.c

@ -246,7 +246,7 @@ void inp_probe(struct card* deck)
sadd(&dnewline, newnode); sadd(&dnewline, newnode);
cadd(&dnewline, ' '); cadd(&dnewline, ' ');
/* to make the nodes unique */ /* to make the nodes unique */
snprintf(nodebuf, 10, "%d", i);
snprintf(nodebuf, 12, "%d", i);
nodename = get_terminal_name(instname, nodebuf, instances); nodename = get_terminal_name(instname, nodebuf, instances);
char* vline = tprintf("vcurr_%s:%s:%s_%s %s %s 0", instname, nodename, thisnode, nodebuf, newnode, thisnode); char* vline = tprintf("vcurr_%s:%s:%s_%s %s %s 0", instname, nodename, thisnode, nodebuf, newnode, thisnode);
card = insert_new_line(card, vline, 0, 0); card = insert_new_line(card, vline, 0, 0);
@ -376,7 +376,7 @@ void inp_probe(struct card* deck)
tmpstr2 = tmpstr; tmpstr2 = tmpstr;
instname1 = gettok_char(&tmpstr, ':', FALSE, FALSE); instname1 = gettok_char(&tmpstr, ':', FALSE, FALSE);
if (!instname1) { if (!instname1) {
fprintf(stderr, "Warning: Cannot read instance name in %s, ignored\n");
fprintf(stderr, "Warning: Cannot read instance name in %s, ignored\n", tmpstr);
continue; continue;
} }
tmpcard1 = nghash_find(instances, instname1); tmpcard1 = nghash_find(instances, instname1);

Loading…
Cancel
Save