25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

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

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