aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/io_lib.erl
diff options
context:
space:
mode:
authorHenrik Nord <[email protected]>2012-10-18 12:28:58 +0200
committerHenrik Nord <[email protected]>2012-10-18 12:29:00 +0200
commitf0332a299d3c6eea7089483f05a7e6f580e40f3c (patch)
tree45205298465ad4f549182f5c40087c2429d9b058 /lib/stdlib/src/io_lib.erl
parentb30b0a3c0197c2b500849b01f7f9d6f7c6eb831a (diff)
parentc83931cbb3516563949d283fe46453a35cd35977 (diff)
downloadotp-f0332a299d3c6eea7089483f05a7e6f580e40f3c.tar.gz
otp-f0332a299d3c6eea7089483f05a7e6f580e40f3c.tar.bz2
otp-f0332a299d3c6eea7089483f05a7e6f580e40f3c.zip
Merge branch 'at/binary-depth-printing'
* at/binary-depth-printing: Fix printing the empty binary at depth 1 with ~W OTP-10504
Diffstat (limited to 'lib/stdlib/src/io_lib.erl')
-rw-r--r--lib/stdlib/src/io_lib.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/stdlib/src/io_lib.erl b/lib/stdlib/src/io_lib.erl
index ab62b72519..513d904c39 100644
--- a/lib/stdlib/src/io_lib.erl
+++ b/lib/stdlib/src/io_lib.erl
@@ -253,10 +253,10 @@ write_ref(Ref) ->
write_binary(B, D) when is_integer(D) ->
[$<,$<,write_binary_body(B, D),$>,$>].
-write_binary_body(_B, 1) ->
- "...";
write_binary_body(<<>>, _D) ->
"";
+write_binary_body(_B, 1) ->
+ "...";
write_binary_body(<<X:8>>, _D) ->
[integer_to_list(X)];
write_binary_body(<<X:8,Rest/bitstring>>, D) ->