aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--erts/emulator/beam/erl_nif.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_nif.c b/erts/emulator/beam/erl_nif.c
index 8b6cb880a3..6fa8164787 100644
--- a/erts/emulator/beam/erl_nif.c
+++ b/erts/emulator/beam/erl_nif.c
@@ -967,10 +967,11 @@ ERL_NIF_TERM enif_make_uint64(ErlNifEnv* env, ErlNifUInt64 i)
ERL_NIF_TERM enif_make_double(ErlNifEnv* env, double d)
{
Eterm* hp;
+ FloatDef f;
+
if (!erts_isfinite(d))
return enif_make_badarg(env);
hp = alloc_heap(env,FLOAT_SIZE_OBJECT);
- FloatDef f;
f.fd = d;
PUT_DOUBLE(f, hp);
return make_float(hp);