Fixed critical typo.

This commit is contained in:
Morten Rolland 1999-06-28 12:49:15 +00:00
parent 2f336bc056
commit 893bbca339
1 changed files with 3 additions and 2 deletions

View File

@ -471,7 +471,7 @@ void produce_bits(encoder_hdlc_private *priv)
} }
/* Fetch the next byte to be transmitted, and compute FCS */ /* Fetch the next byte to be transmitted, and compute FCS */
next = (*priv->src++ && 0x00ff); next = (*priv->src++ & 0x00ff);
next_size = 8; next_size = 8;
priv->remaining_bytes--; priv->remaining_bytes--;
priv->fcs = (priv->fcs>>8) ^ hdlc_fcs_lookup[(priv->fcs&0xff)^next]; priv->fcs = (priv->fcs>>8) ^ hdlc_fcs_lookup[(priv->fcs&0xff)^next];
@ -486,10 +486,11 @@ void produce_bits(encoder_hdlc_private *priv)
break; break;
case PAYLOAD: case PAYLOAD:
priv->phase = FCS; priv->phase = FCS;
priv->src = priv->fcs_tx; priv->src = &priv->fcs_tx[0];
priv->remaining_bytes = 2; priv->remaining_bytes = 2;
priv->fcs_tx[0] = ~(priv->fcs & 0xff); priv->fcs_tx[0] = ~(priv->fcs & 0xff);
priv->fcs_tx[1] = ~((priv->fcs>>8) & 0xff); priv->fcs_tx[1] = ~((priv->fcs>>8) & 0xff);
break; break;
case FCS: case FCS:
priv->phase = IDLE; priv->phase = IDLE;