Revert "Buffer boundary check - test 1"

This reverts commit 1c0c744983.
This commit is contained in:
GHOSCHT 2021-08-26 14:48:10 +02:00
parent d20c4f6f28
commit ffc306b59e

View file

@ -76,12 +76,8 @@ void receiveEvent(int byteCount)
char buffer[byteCount]; char buffer[byteCount];
for (int i = 0; i < byteCount; i++) for (int i = 0; i < byteCount; i++)
{ {
if (i == byteCount)
break;
buffer[i] = Wire.read(); buffer[i] = Wire.read();
} }
memset(receivedI2cData, ' ', 3); memset(receivedI2cData, ' ', 3);
strcpy(receivedI2cData, buffer); strcpy(receivedI2cData, buffer);
} }