From c94563d98d5ecf26baf4c2dfb6a52bd3aef1fa47 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 6 Aug 2007 15:33:49 +0000 Subject: (pciusb_find_modules) handle pcitable without description field --- pciusb.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pciusb.c') diff --git a/pciusb.c b/pciusb.c index 0803c2d..971e20b 100644 --- a/pciusb.c +++ b/pciusb.c @@ -137,6 +137,8 @@ extern int pciusb_find_modules(struct pciusb_entries *entries, const char *fpciu if (!p) { // only calc text & module if not already done p = buf + offset + 1; q = strchr(p, '\t'); + if (!q) // no description field? + q = strchr(p, '\0') - 1; } if (strncmp(p, "unknown", q-p-1)) { ifree(e->module); -- cgit v1.2.1