aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2012-07-17 15:49:05 -0500
committerDan Williams <dcbw@redhat.com>2012-07-18 10:51:44 -0500
commite7715af875eb26517ae63e6e1db784b903da702e (patch)
treeb17beb33d16b2c89f9bc4d5f84f6f39a168f3fbd
parent2506e3093e9cc47bc03e34b0dd9c58c13469aec5 (diff)
serial: fix AT port carriage return handling
Off-by-one, fix it.
-rw-r--r--src/mm-at-serial-port.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mm-at-serial-port.c b/src/mm-at-serial-port.c
index c16e8786..38ec38e4 100644
--- a/src/mm-at-serial-port.c
+++ b/src/mm-at-serial-port.c
@@ -297,7 +297,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;