diff --git a/gecko.c b/gecko.c index fc288ca..f249b01 100644 --- a/gecko.c +++ b/gecko.c @@ -143,6 +143,8 @@ static int gecko_sendbuffer(const void *buffer, u32 size) while(left>0) { if(!_gecko_sendbyte(*ptr)) break; + if(*ptr == '\n' && !_gecko_sendbyte('\r')) + break; ptr++; left--; } @@ -181,6 +183,8 @@ static int gecko_sendbuffer_safe(const void *buffer, u32 size) if(_gecko_checksend()) { if(!_gecko_sendbyte(*ptr)) break; + if(*ptr == '\n' && !_gecko_sendbyte('\r')) + break; ptr++; left--; }