Cleanup the mux attach string for single line multiplexers

This commit is contained in:
Mark Pizzolato 2012-12-29 07:40:21 -08:00
parent 9d2811d666
commit 53c537b8dd

View file

@ -672,6 +672,9 @@ for (i=0; i<mp->lines; ++i) {
sprintf (growstring(&tptr, 12 + strlen (lp->port)), ",%s%s", lp->port, lp->notelnet ? ";notelnet" : ""); sprintf (growstring(&tptr, 12 + strlen (lp->port)), ",%s%s", lp->port, lp->notelnet ? ";notelnet" : "");
} }
} }
if (mp->lines == 1)
while ((*tptr == ',') || (*tptr == ' '))
strcpy(tptr, tptr+1);
if (*tptr == '\0') { if (*tptr == '\0') {
free (tptr); free (tptr);
tptr = NULL; tptr = NULL;