diff options
author | Sverker Eriksson <[email protected]> | 2016-02-18 15:59:56 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2016-02-18 15:59:56 +0100 |
commit | eae8965a58b049cef1562b4462b05d9cab5286c3 (patch) | |
tree | 2efb7416fadd4820d7d8f1a83cf16d3d73d5744f /erts/emulator/beam/beam_bif_load.c | |
parent | 85d2337de76ba43f087478d4566641d632f06fec (diff) | |
parent | 7a319cd96f7f4869300b32442ebe892ae557f41c (diff) | |
download | otp-eae8965a58b049cef1562b4462b05d9cab5286c3.tar.gz otp-eae8965a58b049cef1562b4462b05d9cab5286c3.tar.bz2 otp-eae8965a58b049cef1562b4462b05d9cab5286c3.zip |
Merge branch 'sverk/fix-list-length-int/OTP-13288'
* sverk/fix-list-length-int/OTP-13288:
erts: Fix error cases in enif_get_list_length
erts: Use Sint instead of int for list lengths
Diffstat (limited to 'erts/emulator/beam/beam_bif_load.c')
-rw-r--r-- | erts/emulator/beam/beam_bif_load.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/erts/emulator/beam/beam_bif_load.c b/erts/emulator/beam/beam_bif_load.c index a000935388..1b4c022370 100644 --- a/erts/emulator/beam/beam_bif_load.c +++ b/erts/emulator/beam/beam_bif_load.c @@ -179,8 +179,8 @@ exception_list(Process* p, Eterm tag, struct m* mp, Sint exceptions) BIF_RETTYPE finish_loading_1(BIF_ALIST_1) { - int i; - int n; + Sint i; + Sint n; struct m* p = NULL; Uint exceptions; Eterm res; @@ -201,7 +201,7 @@ finish_loading_1(BIF_ALIST_1) */ n = erts_list_length(BIF_ARG_1); - if (n == -1) { + if (n < 0) { ERTS_BIF_PREP_ERROR(res, BIF_P, BADARG); goto done; } |