diff options
Diffstat (limited to 'extras/usb_id/usb_id.c')
-rw-r--r-- | extras/usb_id/usb_id.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/extras/usb_id/usb_id.c b/extras/usb_id/usb_id.c index f5ee795924..c4ce0c6103 100644 --- a/extras/usb_id/usb_id.c +++ b/extras/usb_id/usb_id.c @@ -82,7 +82,7 @@ static void set_str(char *to, const char *from, size_t count) /* strip trailing whitespace */ len = strnlen(from, count); - while (isspace(from[len-1])) + while (len && isspace(from[len-1])) len--; /* strip leading whitespace */ |