From 9318323b769200ee328456b0ef92ea19c1b96b6e Mon Sep 17 00:00:00 2001 From: Matthew Crymble Date: Thu, 25 Jun 2020 20:02:24 -0500 Subject: uhd: improved handling of empty serial number hints This allows device::find() calls to proceed even when encountering an empty/invalid serial number or serial number device argument hint. --- host/lib/utils/serial_number.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'host/lib') diff --git a/host/lib/utils/serial_number.cpp b/host/lib/utils/serial_number.cpp index af66197fd..61296a913 100644 --- a/host/lib/utils/serial_number.cpp +++ b/host/lib/utils/serial_number.cpp @@ -17,6 +17,8 @@ namespace uhd { namespace utils { return a == b; } catch (std::out_of_range& e) { return false; + } catch (std::invalid_argument& e) { + return false; } } }} -- cgit v1.2.3