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-17 15:49:05 -0500
commit3cea1b8860411352d588095bc5a1210d1d867747 (patch)
tree67526afd56c32e6d8ee010aa7931f198f81c803c
parente0246e041dc9c48d7c1bca579b343733f61d89f3 (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 74843d72..14783009 100644
--- a/src/mm-at-serial-port.c
+++ b/src/mm-at-serial-port.c
@@ -250,7 +250,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;