Revert "Buffer boundary check - test 1"
This reverts commit 1c0c744983
.
This commit is contained in:
parent
d20c4f6f28
commit
ffc306b59e
1 changed files with 118 additions and 122 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue