| Index: device/serial/serial_device_enumerator_win.cc
|
| diff --git a/device/serial/serial_device_enumerator_win.cc b/device/serial/serial_device_enumerator_win.cc
|
| index 2e83fd6f96332c2cb99d4c4be04e9a29069c9b70..e94564c5a71febfcce6a027f85901a9524a4c311 100644
|
| --- a/device/serial/serial_device_enumerator_win.cc
|
| +++ b/device/serial/serial_device_enumerator_win.cc
|
| @@ -66,7 +66,7 @@ bool GetDisplayName(const std::string friendly_name,
|
| // vendor_id, and returns whether the operation was successful.
|
| bool GetVendorID(const std::string hardware_id, uint32_t* vendor_id) {
|
| std::string vendor_id_str;
|
| - return RE2::PartialMatch(hardware_id, "VID_([0-9]+)", &vendor_id_str) &&
|
| + return RE2::PartialMatch(hardware_id, "VID_([0-9a-fA-F]+)", &vendor_id_str) &&
|
| base::HexStringToUInt(vendor_id_str, vendor_id);
|
| }
|
|
|
| @@ -74,7 +74,8 @@ bool GetVendorID(const std::string hardware_id, uint32_t* vendor_id) {
|
| // product_id, and returns whether the operation was successful.
|
| bool GetProductID(const std::string hardware_id, uint32_t* product_id) {
|
| std::string product_id_str;
|
| - return RE2::PartialMatch(hardware_id, "PID_([0-9]+)", &product_id_str) &&
|
| + return RE2::PartialMatch(hardware_id, "PID_([0-9a-fA-F]+)",
|
| + &product_id_str) &&
|
| base::HexStringToUInt(product_id_str, product_id);
|
| }
|
|
|
|
|