|
@@ -266,11 +266,10 @@ sub set {
|
266
|
266
|
|
267
|
267
|
# Split out any data belonging to the next image
|
268
|
268
|
delete $self->{next_image};
|
269
|
|
- my $length = ( $hash->{length} * 512 );
|
270
|
269
|
my $pci_header = $hash->pci_header();
|
271
|
|
- if ( ( $length < length $data ) &&
|
272
|
|
- ( defined $pci_header ) &&
|
|
270
|
+ if ( ( defined $pci_header ) &&
|
273
|
271
|
( ! ( $pci_header->{last_image} & PCI_LAST_IMAGE ) ) ) {
|
|
272
|
+ my $length = ( $pci_header->{image_length} * 512 );
|
274
|
273
|
my $remainder = substr ( $data, $length );
|
275
|
274
|
$data = substr ( $data, 0, $length );
|
276
|
275
|
$self->{next_image} = new Option::ROM;
|