diff options
Diffstat (limited to 'src/mm-at-serial-port.c')
-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 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; |