fix signedness for char

This commit is contained in:
morgan 2018-11-07 16:40:44 -08:00
parent ba97bd4702
commit 07fbb1af2f
1 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@
#include "packet.h" #include "packet.h"
#include "KISS.h" #include "KISS.h"
//AFSK::Packet kissPacket; //AFSK::Packet kissPacket;
bool inFrame = false; bool inFrame = false;
uint8_t kissBuffer[PACKET_MAX_LEN]; uint8_t kissBuffer[PACKET_MAX_LEN];
@ -76,7 +77,7 @@ void KISS::writePacket(AFSK::Packet *p) {
io->write(KISS_FEND); io->write(KISS_FEND);
io->write((uint8_t)0); // Host to TNC port identifier io->write((uint8_t)0); // Host to TNC port identifier
for(i = 0; i < p->len-2; i++) { for(i = 0; i < p->len-2; i++) {
char c = p->getByte(i); unsigned char c = p->getByte(i);
if(c == KISS_FEND || c == KISS_FESC) { if(c == KISS_FEND || c == KISS_FESC) {
io->write(KISS_FESC); io->write(KISS_FESC);
io->write((c==KISS_FEND?KISS_TFEND:KISS_TFESC)); io->write((c==KISS_FEND?KISS_TFEND:KISS_TFESC));