diff options
author | Hans Bolinder <[email protected]> | 2019-06-12 08:22:52 +0200 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2019-06-12 08:22:52 +0200 |
commit | 9602e68a364abda026b0fdc5b4da7758d6201da1 (patch) | |
tree | f90d809a37020442f52206bb61c9bbcbd3e97566 /lib/stdlib/src | |
parent | 3faa598e44f95db1521102cebe2bc862ec46083b (diff) | |
parent | acc3b04fb0128fca1770a3823b6651f632d73939 (diff) | |
download | otp-9602e68a364abda026b0fdc5b4da7758d6201da1.tar.gz otp-9602e68a364abda026b0fdc5b4da7758d6201da1.tar.bz2 otp-9602e68a364abda026b0fdc5b4da7758d6201da1.zip |
Merge branch 'hasse/stdlib/chars_limit_bug/OTP-15875/ERL-967' into maint
* hasse/stdlib/chars_limit_bug/OTP-15875/ERL-967:
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.erl | 4 |
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) |