Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Commit

Permalink
Fix empty msg case.
Browse files Browse the repository at this point in the history
  • Loading branch information
archaelus committed Mar 22, 2012
1 parent 5a2b9fe commit f0f4e8a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/logplex_utils.erl
Expand Up @@ -92,6 +92,7 @@ format(_Msg) ->
"".

-spec nl(Msg::iolist()) -> iolist().
nl(<<>>) -> <<"\n">>;
nl(Msg) when is_binary(Msg) ->
case binary:at(Msg, byte_size(Msg)-1) of
$\n -> [Msg];
Expand Down

0 comments on commit f0f4e8a

Please sign in to comment.