Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix variable 'Bytes' exported from 'case' #1

Merged
merged 1 commit into from Jun 24, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/binpp.erl
Expand Up @@ -77,12 +77,12 @@ cmprint(Bin1, Bin2) when is_binary(Bin1) orelse is_bitstring(Bin1),
-spec from_str(string(), hex) -> binary().

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

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