diff --git a/src/modem.rs b/src/modem.rs index 588f768..87f908b 100644 --- a/src/modem.rs +++ b/src/modem.rs @@ -121,7 +121,7 @@ impl Modem { // // This check here is tested on sim800l and works only because the modem has \r\n as CRLF. if line.ends_with("\r") { - Ok(line[0..line.len()-1].to_string()) + Ok(format!("{}\n", line)) } else { Err(ModemError::ReadError)