Skip to content

Commit f8aa06a

Browse files
committed
Correct warning
1 parent 1592b39 commit f8aa06a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

libraries/SPI/SPI.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,10 @@ uint16_t SPIClass::transfer16(uint16_t data) {
209209
void SPIClass::transfer(void *buf, size_t count)
210210
{
211211
uint8_t *buffer = reinterpret_cast<uint8_t *>(buf);
212-
for (size_t i=0; i<count; i++)
213-
*buffer++ = transfer(*buffer);
212+
for (size_t i=0; i<count; i++) {
213+
*buffer = transfer(*buffer);
214+
buffer++;
215+
}
214216
}
215217

216218
void SPIClass::attachInterrupt() {

0 commit comments

Comments
 (0)