diff options
author | Dan Williams <dcbw@redhat.com> | 2012-07-17 15:49:05 -0500 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2012-07-17 16:03:26 -0500 |
commit | bcaacb252d6b59af07eff5e8ace31a6a85eb4cda (patch) | |
tree | 947b09b1b45bfdd6c37dd1fc574928e69ecda0a8 | |
parent | c1c94333d7e33a257a8476393e468e8dd57482d5 (diff) |
serial: fix AT port carriage return handling
Off-by-one, fix it.
-rw-r--r-- | src/mm-at-serial-port.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mm-at-serial-port.c b/src/mm-at-serial-port.c index 5bc17899..4336b036 100644 --- a/src/mm-at-serial-port.c +++ b/src/mm-at-serial-port.c @@ -249,7 +249,7 @@ at_command_to_byte_array (const char *command) g_byte_array_append (buf, (const guint8 *) command, cmdlen); /* Make sure there's a trailing carriage return */ - if (command[cmdlen] != '\r') + if (command[cmdlen - 1] != '\r') g_byte_array_append (buf, (const guint8 *) "\r", 1); return buf; |