1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-15 00:23:56 +01:00
Arduino/hardware/arduino/sam/cores
Matthijs Kooijman 4cf21dcdd1 Don't store peeked characters in a char variable
peekNextDigit() returns an int, so it can return -1 in addition to all
256 possible bytes. By putting the result in a signe char, all bytes
over 128 will be interpreted as "no bytes available". Furthermore, it
seems that on SAM "char" is unsigned by default, causing the
"if (c < 0)" line a bit further down to always be false.

Using an int is more appropriate.

A different fix for this issue was suggested in #1399. This fix helps
towards #1728.
2014-02-19 16:09:30 +01:00
..
arduino Don't store peeked characters in a char variable 2014-02-19 16:09:30 +01:00