diff options
-rw-r--r-- | lib/stdlib/src/io_lib_format.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/stdlib/src/io_lib_format.erl b/lib/stdlib/src/io_lib_format.erl index e247b00a04..ab9031573b 100644 --- a/lib/stdlib/src/io_lib_format.erl +++ b/lib/stdlib/src/io_lib_format.erl @@ -246,7 +246,8 @@ count_small([#{control_char := $W}|Cs], #{w := W} = Cnts) -> count_small(Cs, Cnts#{w := W + 1}); count_small([#{control_char := $s}|Cs], #{w := W} = Cnts) -> count_small(Cs, Cnts#{w := W + 1}); -count_small([S|Cs], #{other := Other} = Cnts) when is_list(S) -> +count_small([S|Cs], #{other := Other} = Cnts) when is_list(S); + is_binary(S) -> count_small(Cs, Cnts#{other := Other + string:length(S)}); count_small([C|Cs], #{other := Other} = Cnts) when is_integer(C) -> count_small(Cs, Cnts#{other := Other + 1}); |