X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fserial_hid.c;h=4a5f9bb98995324fa82c9c16158a8a7d0d68cc78;hb=1ac6436468d7d4110d053c994df2db0583b0857e;hp=0c5b9ccc27d5ee94a7e53b94df45f2ab57c32f67;hpb=87307940f11c53a3f4efe7c4aaddd9db75ebae9c;p=libsigrok.git diff --git a/src/serial_hid.c b/src/serial_hid.c index 0c5b9ccc..4a5f9bb9 100644 --- a/src/serial_hid.c +++ b/src/serial_hid.c @@ -199,14 +199,14 @@ static GSList *ser_hid_hidapi_list(GSList *list, sr_ser_list_append_t append) pid = curdev->product_id; desc = g_string_sized_new(128); g_string_append_printf(desc, "HID"); - if (manuf) + if (manuf && wcslen(manuf) != 0) g_string_append_printf(desc, " %ls", manuf); - if (prod) + if (prod && wcslen(prod) != 0) g_string_append_printf(desc, " %ls", prod); - if (serno) + if (serno && wcslen(serno) != 0) g_string_append_printf(desc, " %ls", serno); if (vid && pid) - g_string_append_printf(desc, " %04hx:%04hx", vid, pid); + g_string_append_printf(desc, " [%04hx.%04hx]", vid, pid); list = append(list, name, desc->str); g_string_free(desc, TRUE); g_free(name);