Skip to content

Commit

Permalink
Fix variable 'Bytes' exported from 'case'
Browse files Browse the repository at this point in the history
  • Loading branch information
voluntas committed Jun 24, 2012
1 parent b080744 commit e4704f5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/binpp.erl
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ cmprint(Bin1, Bin2) when is_binary(Bin1) orelse is_bitstring(Bin1),
-spec from_str(string(), hex) -> binary(). -spec from_str(string(), hex) -> binary().


from_str(Str, hex) when is_list(Str) -> from_str(Str, hex) when is_list(Str) ->
case lists:member($ , Str) of Bytes = case lists:member($ , Str) of
true -> true ->
Bytes = string:tokens(Str, " "); string:tokens(Str, " ");
false when length(Str) rem 2 =:= 0 -> false when length(Str) rem 2 =:= 0 ->
Bytes = buckets(2, Str) buckets(2, Str)
end, end,
list_to_binary([ list_to_integer(B,16) || B <- Bytes]). list_to_binary([ list_to_integer(B,16) || B <- Bytes]).


-spec from_str(string()) -> binary(). -spec from_str(string()) -> binary().
Expand Down

0 comments on commit e4704f5

Please sign in to comment.