Skip to content
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.

Commit

Permalink
correctly handled truncated output.
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Newson committed Jul 29, 2011
1 parent 8e07af3 commit 90607c0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/twig_util.erl
Expand Up @@ -67,7 +67,8 @@ format(Format, Data) ->
case erts_debug:flat_size(Data) > MaxTermSize of
true ->
MaxString = get_env(max_message_size, 16000),
["*Truncated* ", Format, " - ", trunc_io:print(Data, MaxString)];
{Truncated, _} = trunc_io:print(Data, MaxString),
["*Truncated* ", Format, " - ", Truncated];
false ->
io_lib:format(Format, Data)
end.
Expand Down

0 comments on commit 90607c0

Please sign in to comment.