Require hackrf argument to have a non-zero-length value to trigger serial number search

Signed-off-by: Heikki Hannikainen <hessu@hes.iki.fi>
This commit is contained in:
Heikki Hannikainen 2015-02-24 11:30:16 +02:00 committed by Dimitri Stolnikov
parent 9595b044b6
commit d4387f436d
1 changed files with 1 additions and 1 deletions

View File

@ -106,7 +106,7 @@ hackrf_source_c::hackrf_source_c (const std::string &args)
dict_t dict = params_to_dict(args);
if (dict.count("hackrf"))
if (dict.count("hackrf") && dict["hackrf"].length() > 0)
hackrf_serial = &dict["hackrf"];
_buf_num = _buf_len = _buf_head = _buf_used = _buf_offset = 0;