arduino / arduino/ArduinoCore-avr
Wrong type in function puthex() of file ATmegaBOOT_168.c
Open
- Dominant language
- C
- Stars
- 1.5k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
The function void puthex(char ch) of file
arduino-1.6.9/hardware/arduino/avr/bootloaders/atmega/ATmegaBOOT_168.c is wrong. The correct version is:
void puthex(unsigned char ch) {
unsigned char ah;
```
ah = ch >> 4;
if(ah >= 0x0a) {
ah = ah - 0x0a + 'a';
} else {
ah += '0';
}
ch &= 0x0f;
if(ch >= 0x0a) {
ch = ch - 0x0a + 'a';
} else {
ch += '0';
}
putch(ah);
putch(ch);
```
}
The type of ch and ah has to be unsigned char instead of char.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.