aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/input
diff options
context:
space:
mode:
authorLibravatar Sergei Dolgov <dolgovs@gmail.com>2019-06-22 14:25:48 +0200
committerLibravatar Simon Ser <contact@emersion.fr>2019-07-05 18:41:56 +0300
commitbcceb61b43c917247800d104d1fa064f51ab56a1 (patch)
tree50315dafcdd2ebf42502349e88c6749820a3afba /sway/commands/input
parentAdd calibration_matrix config option (diff)
downloadsway-bcceb61b43c917247800d104d1fa064f51ab56a1.tar.gz
sway-bcceb61b43c917247800d104d1fa064f51ab56a1.tar.zst
sway-bcceb61b43c917247800d104d1fa064f51ab56a1.zip
Use isnan
Diffstat (limited to 'sway/commands/input')
-rw-r--r--sway/commands/input/calibration_matrix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/commands/input/calibration_matrix.c b/sway/commands/input/calibration_matrix.c
index ac15d152..9ac2bd7f 100644
--- a/sway/commands/input/calibration_matrix.c
+++ b/sway/commands/input/calibration_matrix.c
@@ -27,7 +27,7 @@ struct cmd_results *input_cmd_calibration_matrix(int argc, char **argv) {
27 for (int i = 0; i < split->length; ++i) { 27 for (int i = 0; i < split->length; ++i) {
28 char *item = split->items[i]; 28 char *item = split->items[i];
29 float x = parse_float(item); 29 float x = parse_float(item);
30 if (x != x) { 30 if (isnan(x)) {
31 return cmd_results_new(CMD_FAILURE, "calibration_matrix: unable to parse float: %s", item); 31 return cmd_results_new(CMD_FAILURE, "calibration_matrix: unable to parse float: %s", item);
32 } 32 }
33 parsed[i] = x; 33 parsed[i] = x;