Subject: | Wrong leader when record length is greater than 99999 |
If the record length is greater than 99999 bytes, generated leader is
invalid since all other informations contained in the leader are shifted
to the right.
Attached patch force the record length to 99999 to avoid this.
Apply with `patch -p0 < patch.txt` at the source root.
Subject: | patch.txt |
*** lib/MARC/Record.pm 2012-05-04 16:21:03.000000000 +0200
--- lib/MARC/Record2.pm 2012-05-04 16:09:19.000000000 +0200
***************
*** 563,568 ****
--- 563,569 ----
my $baseaddr = shift;
if ($reclen > 99999) {
carp( "Record length of $reclen is larger than the MARC spec allows (99999 bytes)." );
+ $reclen = 99999;
}
substr($self->{_leader},0,5) = sprintf("%05d",$reclen);
substr($self->{_leader},12,5) = sprintf("%05d",$baseaddr);