aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/Peripheral/AVR8
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2015-12-22 22:31:54 +1100
committerDean Camera <dean@fourwalledcubicle.com>2015-12-22 22:31:54 +1100
commit0b69eeaf5db2f675c398a982329b6a2bbffc799e (patch)
treeae34c83e7e77e85d9a987b47b9b666459b7a67bd /LUFA/Drivers/Peripheral/AVR8
parent59b9cf8d0f5c8238d17d5a31a6835938a8e739ad (diff)
downloadlufa-0b69eeaf5db2f675c398a982329b6a2bbffc799e.tar.gz
lufa-0b69eeaf5db2f675c398a982329b6a2bbffc799e.tar.bz2
lufa-0b69eeaf5db2f675c398a982329b6a2bbffc799e.zip
Fix void pointer arithmetic in the Serial peripheral drivers.
Diffstat (limited to 'LUFA/Drivers/Peripheral/AVR8')
-rw-r--r--LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.c b/LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.c
index 3df39814e..6680a6ba6 100644
--- a/LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.c
+++ b/LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.c
@@ -88,8 +88,10 @@ void Serial_SendString(const char* StringPtr)
void Serial_SendData(const void* Buffer,
uint16_t Length)
{
+ uint8_t* CurrByte = (uint8_t*)Buffer;
+
while (Length--)
- Serial_SendByte(*((uint8_t*)Buffer++));
+ Serial_SendByte(*(CurrByte++));
}
void Serial_CreateStream(FILE* Stream)