aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2019-06-12 08:32:18 +0200
committerHans Bolinder <[email protected]>2019-06-12 08:32:18 +0200
commite7de6effcc9a754c76400c3527785c1c86361e44 (patch)
tree8d623fdcf9b81330fdb9faea10acaa672b4f9f47 /lib/stdlib/src
parent4adcdcf3f60995657f03aa98e3ba268e59da54c1 (diff)
parent9602e68a364abda026b0fdc5b4da7758d6201da1 (diff)
downloadotp-e7de6effcc9a754c76400c3527785c1c86361e44.tar.gz
otp-e7de6effcc9a754c76400c3527785c1c86361e44.tar.bz2
otp-e7de6effcc9a754c76400c3527785c1c86361e44.zip
Merge branch 'maint'
* maint: stdlib: Fix a bug concerning io_lib option 'chars_limit'
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 0cb3b01aae..77f02eafe0 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)