25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-28 16:34:13 +01:00

Fix version check

Not all Erlang versions are of equal length. Added clauses to handle this.
This commit is contained in:
tjeerd 2013-07-24 14:47:32 +02:00
parent 807a1fe164
commit 3e2f9dc6b0

View File

@ -50,6 +50,10 @@ parse(Version) ->
less_or_equal([[]], [[]]) -> less_or_equal([[]], [[]]) ->
true; true;
less_or_equal([[]], _Any) ->
true;
less_or_equal(_Any, [[]]) ->
false;
less_or_equal([[Left| Rl]], [[Right| Rr]]) -> less_or_equal([[Left| Rl]], [[Right| Rr]]) ->
case {Left < Right, Left == Right} of case {Left < Right, Left == Right} of
{true, _} -> {true, _} ->