Essai d'application Lycée Malraux NSI
Dependencies: BLE_API nRF51822 mbed-dev-bin
Diff: source/drivers/MicroBitSerial.cpp
- Revision:
- 8:ec4465853952
- Parent:
- 6:2e1c2e0d8c7a
- Child:
- 22:23d7b9a4b082
diff -r a4042bbb7f8b -r ec4465853952 source/drivers/MicroBitSerial.cpp --- a/source/drivers/MicroBitSerial.cpp Thu Apr 07 23:39:33 2016 +0100 +++ b/source/drivers/MicroBitSerial.cpp Thu Apr 07 23:39:34 2016 +0100 @@ -567,6 +567,8 @@ { uint8_t buff[size + 1]; + memclr(&buff, size + 1); + int returnedSize = read((uint8_t *)buff, size, mode); if(returnedSize <= 0) @@ -758,6 +760,8 @@ uint8_t localBuff[localBuffSize + 1]; + memclr(&localBuff, localBuffSize + 1); + circularCopy(rxBuff, rxBuffSize, localBuff, preservedTail, foundIndex); //plus one for the character we listened for...