aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2018-10-31 16:22:49 +0100
committerRickard Green <[email protected]>2018-10-31 16:22:49 +0100
commit9a699277bdc8a422ddf5d3ace3cfe59d32f0ce10 (patch)
tree845f38f9ff0b6cf6cfc9a76f677e72c86d738ec6 /erts/emulator/beam
parent040bdce67f88d833bfb59adae130a4ffb4c180f0 (diff)
downloadotp-9a699277bdc8a422ddf5d3ace3cfe59d32f0ce10.tar.gz
otp-9a699277bdc8a422ddf5d3ace3cfe59d32f0ce10.tar.bz2
otp-9a699277bdc8a422ddf5d3ace3cfe59d32f0ce10.zip
Fix erts_internal_ref_number_cmp()
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r--erts/emulator/beam/erl_bif_unique.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/erts/emulator/beam/erl_bif_unique.h b/erts/emulator/beam/erl_bif_unique.h
index 9aa631fde9..e3a633080d 100644
--- a/erts/emulator/beam/erl_bif_unique.h
+++ b/erts/emulator/beam/erl_bif_unique.h
@@ -242,11 +242,11 @@ erts_internal_ref_number_cmp(Uint32 num1[ERTS_REF_NUMBERS],
Uint32 num2[ERTS_REF_NUMBERS])
{
if (num1[2] != num2[2])
- return (int) ((Sint64) num1[2] - (Sint64) num2[2]);
+ return num1[2] > num2[2] ? 1 : -1;
if (num1[1] != num2[1])
- return (int) ((Sint64) num1[1] - (Sint64) num2[1]);
+ return num1[1] > num2[1] ? 1 : -1;
if (num1[0] != num2[0])
- return (int) ((Sint64) num1[0] - (Sint64) num2[0]);
+ return num1[0] > num2[0] ? 1 : -1;
return 0;
}