From fead905e962ccfffe93992788b2614c29e8d563b Mon Sep 17 00:00:00 2001 From: Stephen Nelson Date: Sun, 25 Aug 2013 09:53:05 -0700 Subject: [PATCH] Defaulted seed in binhex_crc to 0 to match docs --- lib/Convert/BinHex.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Convert/BinHex.pm b/lib/Convert/BinHex.pm index a195ee3..7b2e3c1 100644 --- a/lib/Convert/BinHex.pm +++ b/lib/Convert/BinHex.pm @@ -275,6 +275,9 @@ Converted to Perl5 by Eryq. sub binhex_crc { my $len = length($_[0]); my $crc = $_[1]; + if (! defined $crc) { + $crc = 0; + } my $i; for ($i = 0; $i < $len; $i++) { my $ocrc = $crc;