diff --git a/api/modem/at/response.go b/api/modem/at/response.go index aa1a4a3..d3d10f9 100644 --- a/api/modem/at/response.go +++ b/api/modem/at/response.go @@ -9,6 +9,9 @@ func (resp Resp) Check() bool { } func (resp Resp) RmFront(str string) Resp { + if !resp.Check() { + return RespNil + } return Resp(string(resp)[len(str):]) }