aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--erts/emulator/beam/erl_bif_guard.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_bif_guard.c b/erts/emulator/beam/erl_bif_guard.c
index c921b66a7e..09757e473b 100644
--- a/erts/emulator/beam/erl_bif_guard.c
+++ b/erts/emulator/beam/erl_bif_guard.c
@@ -306,7 +306,7 @@ Eterm erts_trapping_length_1(Process* p, Eterm* args)
* We reached the end of the list successfully. Bump reductions
* and return result.
*/
- BUMP_REDS(p, saved_max_iter / 16);
+ BUMP_REDS(p, (saved_max_iter - max_iter) / 16);
return make_small(i);
}