From 112bc97dc60f77b3abacd765b643f7f69d6556bd Mon Sep 17 00:00:00 2001 From: schneider Date: Sun, 11 Dec 2011 00:26:11 +0100 Subject: [PATCH] usbcdc: first think, then commit --- firmware/usbcdc/cdcuser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/usbcdc/cdcuser.c b/firmware/usbcdc/cdcuser.c index 5f5d436..fbbb5af 100644 --- a/firmware/usbcdc/cdcuser.c +++ b/firmware/usbcdc/cdcuser.c @@ -152,7 +152,7 @@ int CDC_WrInBuf (const char *buffer, int *length) bytesWritten = bytesToWrite; // Just block if we can't write all at once - // These ringbuffers smell buggy, so +1 + // +1 to prevent an overflow of the ring buffer while( CDC_BUF_SIZE - CDC_BUF_COUNT(CDC_InBuf) < bytesToWrite+1 ); //uint8_t flush = CDC_DepInEmpty;