aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/bif.c
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2014-09-05 09:49:59 +0200
committerIngela Anderton Andin <[email protected]>2014-09-05 09:49:59 +0200
commit38f49f460ffee0f6f3cbfef129c76e160c63d1a4 (patch)
tree7ee410b853ca2ad861c60409fa4fc5d65c3636a9 /erts/emulator/beam/bif.c
parent8ad5bd0ef8143f5ac32bd2df11d59a20e7eb0527 (diff)
parent35ff91189c8dd4ceed3d8f29536f500787ba4782 (diff)
downloadotp-38f49f460ffee0f6f3cbfef129c76e160c63d1a4.tar.gz
otp-38f49f460ffee0f6f3cbfef129c76e160c63d1a4.tar.bz2
otp-38f49f460ffee0f6f3cbfef129c76e160c63d1a4.zip
Merge branch 'maint' of git-server:otp into maint
Diffstat (limited to 'erts/emulator/beam/bif.c')
-rw-r--r--erts/emulator/beam/bif.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/erts/emulator/beam/bif.c b/erts/emulator/beam/bif.c
index f3c05d047d..a5be8e1529 100644
--- a/erts/emulator/beam/bif.c
+++ b/erts/emulator/beam/bif.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 1996-2013. All Rights Reserved.
+ * Copyright Ericsson AB 1996-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -2891,9 +2891,6 @@ static int do_list_to_integer(Process *p, Eterm orig_list,
res = big_plus_small(res, m, hp);
}
- if (is_big(res)) /* check if small */
- res = big_plus_small(res, 0, hp); /* includes conversion to small */
-
if (neg) {
if (is_small(res))
res = make_small(-signed_val(res));
@@ -2903,8 +2900,12 @@ static int do_list_to_integer(Process *p, Eterm orig_list,
}
}
- if (is_big(res)) {
- hp += (big_arity(res)+1);
+ if (is_not_small(res)) {
+ res = big_plus_small(res, 0, hp); /* includes conversion to small */
+
+ if (is_not_small(res)) {
+ hp += (big_arity(res)+1);
+ }
}
HRelease(p,hp_end,hp);
}