diff options
author | Björn-Egil Dahlberg <[email protected]> | 2015-03-24 17:05:58 +0100 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2015-03-24 17:37:26 +0100 |
commit | a1520d8bd2b467d5128998a5069611b9e6252653 (patch) | |
tree | 5f99a62d68c6b4e87437a6724b7c0844ee7cb5d1 /erts/emulator/beam/bif.c | |
parent | a48186ef9de62ef412327bb4dafe7d50d9278f71 (diff) | |
download | otp-a1520d8bd2b467d5128998a5069611b9e6252653.tar.gz otp-a1520d8bd2b467d5128998a5069611b9e6252653.tar.bz2 otp-a1520d8bd2b467d5128998a5069611b9e6252653.zip |
erts: Fix comparison of exact terms
Comparison of exact terms could cause faulty term tests.
This was caused by a faulty (too small) internal type.
Symptom:
-1 = erts_internal:cmp_term(2147483648,0). %% wrong
Correct:
1 = erts_internal:cmp_term(2147483648,0).
Reported-by: Jesper Louis Andersen
Diffstat (limited to 'erts/emulator/beam/bif.c')
-rw-r--r-- | erts/emulator/beam/bif.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/erts/emulator/beam/bif.c b/erts/emulator/beam/bif.c index 42dd160e38..5ac74032fa 100644 --- a/erts/emulator/beam/bif.c +++ b/erts/emulator/beam/bif.c @@ -4659,7 +4659,7 @@ BIF_RETTYPE bump_reductions_1(BIF_ALIST_1) } BIF_RETTYPE erts_internal_cmp_term_2(BIF_ALIST_2) { - int res = CMP_TERM(BIF_ARG_1,BIF_ARG_2); + Sint res = CMP_TERM(BIF_ARG_1,BIF_ARG_2); /* ensure -1, 0, 1 result */ if (res < 0) { |