summaryrefslogtreecommitdiff
path: root/tools/btgatt-client.c
diff options
context:
space:
mode:
authorArman Uguray <armansito@chromium.org>2014-10-27 07:35:38 -0700
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2014-10-28 14:25:32 +0200
commitc06fbc2b562c69654b60f7f82b170f573a8abab5 (patch)
tree0ffd6e6d62afcf020965ccd523b9f08295e0d19c /tools/btgatt-client.c
parenta7e4f63111bd3294ba99418273024084265c6678 (diff)
downloadbluez-c06fbc2b562c69654b60f7f82b170f573a8abab5.tar.gz
tools/btgatt-client: Fix read-long-value offset parsing.
This patch fixes the way read-long-value command parses the "offset" argument by interpreting it as base 10 instead of 16, which is more intuitive.
Diffstat (limited to 'tools/btgatt-client.c')
-rw-r--r--tools/btgatt-client.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/btgatt-client.c b/tools/btgatt-client.c
index b7bfa2462..e7cd31ccb 100644
--- a/tools/btgatt-client.c
+++ b/tools/btgatt-client.c
@@ -486,8 +486,8 @@ static void cmd_read_long_value(struct client *cli, char *cmd_str)
}
endptr = NULL;
- offset = strtol(argv[1], &endptr, 16);
- if (!endptr || *endptr != '\0' || !handle) {
+ offset = strtol(argv[1], &endptr, 10);
+ if (!endptr || *endptr != '\0') {
printf("Invalid offset: %s\n", argv[1]);
return;
}