diff options
author | Hans Bolinder <[email protected]> | 2019-06-11 08:58:35 +0200 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2019-06-11 09:46:14 +0200 |
commit | acc3b04fb0128fca1770a3823b6651f632d73939 (patch) | |
tree | 4e1518facb2fd9d038cb35f8a9b79c271a06f807 /lib/stdlib/src | |
parent | 7fe7fa3dde556b5b92522f8279d465bb52baf1f6 (diff) | |
download | otp-acc3b04fb0128fca1770a3823b6651f632d73939.tar.gz otp-acc3b04fb0128fca1770a3823b6651f632d73939.tar.bz2 otp-acc3b04fb0128fca1770a3823b6651f632d73939.zip |
stdlib: Fix a bug concerning io_lib option 'chars_limit'
See also https://bugs.erlang.org/browse/ERL-967.
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 8f2fd7ea8f..19e4140893 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) |