aboutsummaryrefslogtreecommitdiff
path: root/firmwares/atmegaxxu2/Arduino-COMBINED-dfu-usbserial-atmega16u2-Mega2560-Rev3.hex
diff options
context:
space:
mode:
authorMatthijs Kooijman <matthijs@stdin.nl>2014-02-18 20:56:31 +0100
committerMatthijs Kooijman <matthijs@stdin.nl>2014-02-19 16:09:30 +0100
commit53c0f1412d9a53ddc7bdeb1743d9054f552b1dab (patch)
tree304ab4c4a84e847f0e115fc4ed0ec02bb58e0115 /firmwares/atmegaxxu2/Arduino-COMBINED-dfu-usbserial-atmega16u2-Mega2560-Rev3.hex
parenta2408d154eb9fa3fa9b07cc5a04e9b3744a9f81a (diff)
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.
Diffstat (limited to 'firmwares/atmegaxxu2/Arduino-COMBINED-dfu-usbserial-atmega16u2-Mega2560-Rev3.hex')
0 files changed, 0 insertions, 0 deletions