diff options
Diffstat (limited to 'extras/ata_id/ata_id.c')
-rw-r--r-- | extras/ata_id/ata_id.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/extras/ata_id/ata_id.c b/extras/ata_id/ata_id.c index 2840e91457..9579db3105 100644 --- a/extras/ata_id/ata_id.c +++ b/extras/ata_id/ata_id.c @@ -68,7 +68,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 */ |