Fix formatting string argument (thanks to Locojay)(github #129)

This commit is contained in:
Badlop 2014-04-30 15:59:44 +02:00
parent 81a906af01
commit b3714a1b2e
1 changed files with 5 additions and 1 deletions

View File

@ -428,7 +428,11 @@ format_arg({array, Elements}, {list, ElementsDef})
format_arg(Arg, integer) when is_integer(Arg) -> Arg;
format_arg(Arg, binary) when is_list(Arg) -> list_to_binary(Arg);
format_arg(Arg, binary) when is_binary(Arg) -> Arg;
format_arg(Arg, string) when is_binary(Arg) -> Arg.
format_arg(Arg, string) when is_list(Arg) -> list_to_binary(Arg);
format_arg(Arg, string) when is_binary(Arg) -> Arg;
format_arg(Arg, Format) ->
?ERROR_MSG("don't know how to format Arg ~p for format ~p , [Arg, Format]")
error.
%% -----------------------------
%% Result