X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/00d0883507efdc17688abafa75e81bf62f83d777..a54ed0085b29f81946f3652bd412103292da7589:/Demos/Device/LowLevel/USBtoSerial/USBtoSerial.c diff --git a/Demos/Device/LowLevel/USBtoSerial/USBtoSerial.c b/Demos/Device/LowLevel/USBtoSerial/USBtoSerial.c index 444aa5e1c..c48c33c08 100644 --- a/Demos/Device/LowLevel/USBtoSerial/USBtoSerial.c +++ b/Demos/Device/LowLevel/USBtoSerial/USBtoSerial.c @@ -237,7 +237,7 @@ void CDC_Task(void) if (Endpoint_IsOUTReceived()) { /* Read the bytes in from the endpoint into the buffer while space is available */ - while (Endpoint_BytesInEndpoint() && (BUFF_STATICSIZE - Rx_Buffer.Elements)) + while (Endpoint_BytesInEndpoint() && (Rx_Buffer.Elements != BUFF_STATICSIZE)) { /* Store each character from the endpoint */ Buffer_StoreElement(&Rx_Buffer, Endpoint_Read_Byte());