Treat device ID values as hex

This avoids Perl warnings when trying to do numeric comparisons on
device IDs that don't consist solely of decimal numbers.
pull/289/head
Jonathan Wakely 7 years ago
parent fe71904441
commit f6221dc6e6

@ -17,8 +17,8 @@ for my $path (@paths) {
my ( $key, $val ) = split( /=/, $line, 2 );
$devices{$path}{$key} = $val;
}
if ( ( $devices{$path}{'ID_VENDOR_ID'} == $vid )
&& ( $devices{$path}{'ID_MODEL_ID'} == $pid ) )
if ( ( hex $devices{$path}{'ID_VENDOR_ID'} == hex $vid )
&& ( hex $devices{$path}{'ID_MODEL_ID'} == hex $pid ) )
{
if ( $devices{$path}{'ID_MM_CANDIDATE'} ) {

Loading…
Cancel
Save