diff options
Diffstat (limited to 'lib/erl_interface')
-rw-r--r-- | lib/erl_interface/src/legacy/erl_eterm.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/erl_interface/src/legacy/erl_eterm.c b/lib/erl_interface/src/legacy/erl_eterm.c index c167fd1f78..060e311f69 100644 --- a/lib/erl_interface/src/legacy/erl_eterm.c +++ b/lib/erl_interface/src/legacy/erl_eterm.c @@ -129,10 +129,8 @@ ETERM *erl_mk_float (double d) /* Erlang does not handle Inf and NaN, so we return an error * rather than letting the Erlang VM complain about a bad external * term. */ - switch(fpclassify(d)) { - case FP_NAN: - case FP_INFINITE: - return NULL; + if(!isfinite(d)) { + return NULL; } ep = erl_alloc_eterm(ERL_FLOAT); |