aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/bif.c
diff options
context:
space:
mode:
Diffstat (limited to 'erts/emulator/beam/bif.c')
-rw-r--r--erts/emulator/beam/bif.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/erts/emulator/beam/bif.c b/erts/emulator/beam/bif.c
index f1fac7f8d0..457910f913 100644
--- a/erts/emulator/beam/bif.c
+++ b/erts/emulator/beam/bif.c
@@ -2886,13 +2886,13 @@ BIF_RETTYPE integer_to_list_1(BIF_ALIST_1)
BIF_RETTYPE integer_to_list_2(BIF_ALIST_2)
{
Eterm res;
- int base;
+ SWord base;
- if (is_not_integer(BIF_ARG_1) || is_not_integer(BIF_ARG_2)) {
+ if (is_not_integer(BIF_ARG_1) || is_not_small(BIF_ARG_2)) {
BIF_ERROR(BIF_P, BADARG);
}
- base = unsigned_val(BIF_ARG_2);
+ base = signed_val(BIF_ARG_2);
if (base < 2 || base > 36) {
BIF_ERROR(BIF_P, BADARG);
}