diff options
author | Sergei Dolgov <dolgovs@gmail.com> | 2019-06-22 14:25:48 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2019-07-05 18:41:56 +0300 |
commit | bcceb61b43c917247800d104d1fa064f51ab56a1 (patch) | |
tree | 50315dafcdd2ebf42502349e88c6749820a3afba /sway/commands/input/calibration_matrix.c | |
parent | 01ec18e80228739bbc099ccb35356d198729ab42 (diff) |
Use isnan
Diffstat (limited to 'sway/commands/input/calibration_matrix.c')
-rw-r--r-- | sway/commands/input/calibration_matrix.c | 2 |
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) { for (int i = 0; i < split->length; ++i) { char *item = split->items[i]; float x = parse_float(item); - if (x != x) { + if (isnan(x)) { return cmd_results_new(CMD_FAILURE, "calibration_matrix: unable to parse float: %s", item); } parsed[i] = x; |