aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2019-06-17 16:50:19 +0200
committerErlang/OTP <[email protected]>2019-06-17 16:50:19 +0200
commite922c52f274e63295c3adeb0ebc650bb695f828b (patch)
tree1762e7bb2201fa580c35d134c509ac7886107d80 /lib/stdlib/src
parentc71e1a8887ffecb2ca305b95fd910e1cb991db4e (diff)
parentacc3b04fb0128fca1770a3823b6651f632d73939 (diff)
downloadotp-e922c52f274e63295c3adeb0ebc650bb695f828b.tar.gz
otp-e922c52f274e63295c3adeb0ebc650bb695f828b.tar.bz2
otp-e922c52f274e63295c3adeb0ebc650bb695f828b.zip
Merge branch 'hasse/stdlib/chars_limit_bug/OTP-15875/ERL-967' into maint-21
* hasse/stdlib/chars_limit_bug/OTP-15875/ERL-967: stdlib: Fix a bug concerning io_lib option 'chars_limit' # Conflicts: # lib/stdlib/test/io_SUITE.erl
Diffstat (limited to 'lib/stdlib/src')
-rw-r--r--lib/stdlib/src/io_lib_pretty.erl4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/stdlib/src/io_lib_pretty.erl b/lib/stdlib/src/io_lib_pretty.erl
index ffc02febdc..96b6ea338a 100644
--- a/lib/stdlib/src/io_lib_pretty.erl
+++ b/lib/stdlib/src/io_lib_pretty.erl
@@ -462,7 +462,9 @@ find_upper(Lower, Term, T, Dl, Dd, D, RF, Enc, Str) ->
case If of
{_, _, _Dots=0, _} -> % even if Len > T
If;
- {_, Len, _, _} when Len =< T, D1 < D orelse D < 0 ->
+ {_, _Len=T, _, _} -> % increasing the depth is meaningless
+ If;
+ {_, Len, _, _} when Len < T, D1 < D orelse D < 0 ->
find_upper(If, Term, T, D1, Dd2, D, RF, Enc, Str);
_ ->
search_depth(Lower, If, Term, T, Dl, D1, RF, Enc, Str)