Skip to content

Commit

Permalink
[util] Fix a potential problem in ROM.pm.
Browse files Browse the repository at this point in the history
This change replaces "my $file_offset = shift // 0x0;" (which results in a
build failure in some environments) with
 "my $file_offset = scalar @_ ? shift : 0x0;" where the intention is 0x0
to be the default value used if the optional file_offset parameter is
not provided.
  • Loading branch information
dbankov-vmware committed Feb 8, 2019
1 parent 36a4c85 commit bd5df7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/Option/ROM.pm
Expand Up @@ -282,7 +282,7 @@ sub set {
my $hash = shift;
my $self = tied(%$hash);
my $data = shift;
my $file_offset = shift // 0x0;
my $file_offset = scalar @_ ? shift : 0x0;

# Store data
$self->{data} = \$data;
Expand Down

0 comments on commit bd5df7c

Please sign in to comment.