From f6221dc6e63b32cc1813548c7a1e74fe9c6ffdd9 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Thu, 15 Feb 2018 23:37:05 +0000 Subject: [PATCH] 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. --- bin/find-device-port-linux-udev | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/find-device-port-linux-udev b/bin/find-device-port-linux-udev index 03a4f799..79201857 100644 --- a/bin/find-device-port-linux-udev +++ b/bin/find-device-port-linux-udev @@ -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'} ) {