From fa06db83981dc30deb164d1723279b52d2eed653 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 15 Sep 2015 04:40:34 +1000 Subject: [PATCH] tools: use strtol(), not strtod() to convert ints oops. Signed-off-by: Peter Hutterer --- tools/ratbag-command.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/ratbag-command.c b/tools/ratbag-command.c index 6fb08d52..1325c257 100644 --- a/tools/ratbag-command.c +++ b/tools/ratbag-command.c @@ -986,7 +986,7 @@ ratbag_cmd_resolution(const struct ratbag_cmd *cmd, profile = options->profile; - resolution_idx = strtod(command, &endp); + resolution_idx = strtol(command, &endp, 10); if (command != endp && *endp == '\0') { resolution = ratbag_profile_get_resolution(profile, resolution_idx); @@ -1473,7 +1473,7 @@ ratbag_cmd_profile(const struct ratbag_cmd *cmd, command = argv[0]; - profile_idx = strtod(command, &endp); + profile_idx = strtol(command, &endp, 10); if (command != endp && *endp == '\0') { profile = ratbag_device_get_profile_by_index(device, profile_idx);