aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator
diff options
context:
space:
mode:
Diffstat (limited to 'erts/emulator')
-rw-r--r--erts/emulator/beam/utils.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/erts/emulator/beam/utils.c b/erts/emulator/beam/utils.c
index 8fc8962e4f..91f4accd30 100644
--- a/erts/emulator/beam/utils.c
+++ b/erts/emulator/beam/utils.c
@@ -1894,10 +1894,12 @@ make_internal_hash(Eterm term)
{
FloatDef ff;
GET_DOUBLE(term, ff);
+ if (ff.fd == 0.0) {
+ ff.fd = 0.0; /* ensure pos. 0.0 */
+ }
UINT32_HASH_2(ff.fw[0], ff.fw[1], HCONST_12);
goto pop_next;
}
-
default:
erl_exit(1, "Invalid tag in make_hash2(0x%X)\n", term);
}