aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino
diff options
context:
space:
mode:
authorCristian Maglie <c.maglie@bug.st>2014-02-18 22:43:16 +0100
committerCristian Maglie <c.maglie@bug.st>2014-02-18 22:43:16 +0100
commit462dab38c323f9aac6c6868fb1f8e71084665d1a (patch)
treee4317fd911f8e1196d5d1b8c5bbf021bc95339a5 /cores/arduino
parentf4cd0ff0a4708b94744e08bbd72ce389797b93a8 (diff)
parent45b5aa3ebb2168e19441167ec4740f34389dae26 (diff)
Merge pull request #1870 from matthijskooijman/ide-1.5.x-serial-int
In HardwareSerial::_rx_complete_irq, don't use int for buffer index
Diffstat (limited to 'cores/arduino')
-rw-r--r--cores/arduino/HardwareSerial_private.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/cores/arduino/HardwareSerial_private.h b/cores/arduino/HardwareSerial_private.h
index 915d7a1..fa20e55 100644
--- a/cores/arduino/HardwareSerial_private.h
+++ b/cores/arduino/HardwareSerial_private.h
@@ -99,7 +99,7 @@ void HardwareSerial::_rx_complete_irq(void)
// No Parity error, read byte and store it in the buffer if there is
// room
unsigned char c = *_udr;
- int i = (unsigned int)(_rx_buffer_head + 1) % SERIAL_BUFFER_SIZE;
+ uint8_t i = (unsigned int)(_rx_buffer_head + 1) % SERIAL_BUFFER_SIZE;
// if we should be storing the received character into the location
// just before the tail (meaning that the head would advance to the