Skip to content

Commit

Permalink
Use erlang:crc32/1 instead of zlib:crc32/2 (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
alphabitserial authored Sep 9, 2024
1 parent 82a11bb commit 4b0b3e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/egd_png.erl
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ png_type(r8g8b8) -> ?TRUECOLOUR.

create_chunk(Bin,Z) when is_list(Bin) ->
create_chunk(list_to_binary(Bin),Z);
create_chunk(Bin,Z) when is_binary(Bin) ->
create_chunk(Bin,_Z) when is_binary(Bin) ->
Sz = size(Bin)-4,
Crc = zlib:crc32(Z,Bin),
Crc = erlang:crc32(Bin),
<<Sz:32,Bin/binary,Crc:32>>.

% End tainted

0 comments on commit 4b0b3e6

Please sign in to comment.