mirror of
https://github.com/softwarejanitor/DOS33.git
synced 2024-10-04 02:57:32 +00:00
Bug fixes
This commit is contained in:
parent
367924be08
commit
eff4a1e106
6
PO.pm
6
PO.pm
@ -130,6 +130,12 @@ sub read_blk {
|
||||
return 0;
|
||||
}
|
||||
|
||||
sub clear_buf {
|
||||
my ($buf) = @_;
|
||||
|
||||
$$buf = pack "C*", 0x00 x 512;
|
||||
}
|
||||
|
||||
#
|
||||
# Write Track/Sector
|
||||
#
|
||||
|
@ -1011,6 +1011,7 @@ sub read_file {
|
||||
my $blkno = 1;
|
||||
foreach my $blk (@blks) {
|
||||
#print "blkno=$blkno blk=$blk\n";
|
||||
clear_buf(\$buf2);
|
||||
if (read_blk($pofile, $blk, \$buf2)) {
|
||||
dump_blk($buf2) if $debug;
|
||||
my @bytes = unpack "C*", $buf2;
|
||||
@ -1083,6 +1084,7 @@ sub get_vol_bit_map {
|
||||
|
||||
my $trk = 0;
|
||||
for (my $blk = $bit_map_pointer; $blk < $bit_map_pointer + $num_vol_bit_map_blks; $blk++) {
|
||||
clear_buf(\$buf);
|
||||
if (read_blk($pofile, $bit_map_pointer, \$buf)) {
|
||||
dump_blk($buf) if $debug;
|
||||
my (@blks) = parse_vol_bit_map($buf, $debug);
|
||||
|
Loading…
Reference in New Issue
Block a user