SCP: Fix buffered console implementation to correctly retain buffering attributes across independent SET CONSOLE commands

This commit is contained in:
Mark Pizzolato 2014-05-11 06:16:46 -07:00
parent 746e5ab88c
commit f6eb4bc4f5

View file

@ -2275,12 +2275,13 @@ while (*tptr) {
} }
} }
} }
mp->buffered = atoi(buffered);
for (i = 0; i < mp->lines; i++) { /* initialize line buffers */ for (i = 0; i < mp->lines; i++) { /* initialize line buffers */
lp = mp->ldsc + i; lp = mp->ldsc + i;
if (buffered[0]) { if (mp->buffered) {
lp->txbsz = atoi(buffered); lp->txbsz = mp->buffered;
lp->txbfd = 1; lp->txbfd = 1;
lp->rxbsz = atoi(buffered); lp->rxbsz = mp->buffered;
} }
else { else {
lp->txbsz = TMXR_MAXBUF; lp->txbsz = TMXR_MAXBUF;