Skip to content

Commit

Permalink
io_lib_format string precision fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ayakout committed Nov 24, 2010
1 parent ba4e0b4 commit 3498807
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/stdlib/src/io_lib_format.erl
Expand Up @@ -573,9 +573,7 @@ string(S, F, Adj, F, Pad) ->
string(S, none, Adj, F, Pad);
string(S, F, Adj, P, Pad) when F > P ->
N = lists:flatlength(S),
if N > F -> flat_trunc(S, F);
N =:= F -> S;
N > P -> adjust(flat_trunc(S, P), chars(Pad, F-P), Adj);
if N > P -> adjust(flat_trunc(S, P), chars(Pad, F-P), Adj);
N =:= P -> adjust(S, chars(Pad, F-P), Adj);
true -> adjust([S|chars(Pad, P-N)], chars(Pad, F-P), Adj)
end.
Expand Down

0 comments on commit 3498807

Please sign in to comment.