Permalink
Browse files

binary to is_binary

  • Loading branch information...
1 parent 85fbcd4 commit a0695181c48fc9ab18aa772f557aa26878773eb9 @etrepum etrepum committed Feb 24, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/lzw.erl
View
4 src/lzw.erl
@@ -547,9 +547,9 @@ write(Code, CLen, {Totlen, List, Acc}) ->
if
NewLen rem 8 == 0 ->
case buildbin(reverse([{CLen,Code}|List])) of
- Bin when binary(Bin) ->
+ Bin when is_binary(Bin) ->
{0, [],[Bin|Acc]};
- {Bin, NewList} when binary(Bin) ->
+ {Bin, NewList} when is_binary(Bin) ->
Sum = foldl(fun({X,_}, Sum) -> X + Sum end, 0, NewList),
{Sum,reverse(NewList),[Bin|Acc]}
end;

0 comments on commit a069518

Please sign in to comment.