From 2aa6f6fb96676f87b6434ff3f57b6a218da8c56e Mon Sep 17 00:00:00 2001 From: Arman Uguray Date: Mon, 27 Oct 2014 07:35:39 -0700 Subject: [PATCH] tools/btgatt-client: Fix off-by-one error. This patch fixes an error in write-long-value command that caused an extra invalid byte to get sent at the end of the long write value. --- tools/btgatt-client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/btgatt-client.c b/tools/btgatt-client.c index e7cd31ccb..ea9acb77e 100644 --- a/tools/btgatt-client.c +++ b/tools/btgatt-client.c @@ -709,7 +709,7 @@ static void cmd_write_long_value(struct client *cli, char *cmd_str) return; } - length = argc - 1; + length = argc - 2; if (length > 0) { if (length > UINT16_MAX) { -- 2.47.3