diff options
Diffstat (limited to 'modutils/lsmod.c')
-rw-r--r-- | modutils/lsmod.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modutils/lsmod.c b/modutils/lsmod.c index ab7c11f2a..d7e16689b 100644 --- a/modutils/lsmod.c +++ b/modutils/lsmod.c | |||
@@ -87,7 +87,8 @@ int lsmod_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | |||
87 | // N.B. token[3] is either '-' (module is not used by others) | 87 | // N.B. token[3] is either '-' (module is not used by others) |
88 | // or comma-separated list ended by comma | 88 | // or comma-separated list ended by comma |
89 | // so trimming the trailing char is just what we need! | 89 | // so trimming the trailing char is just what we need! |
90 | token[3][strlen(token[3])-1] = '\0'; | 90 | if (token[3][0]) |
91 | token[3][strlen(token[3]) - 1] = '\0'; | ||
91 | # if ENABLE_UNICODE_SUPPORT | 92 | # if ENABLE_UNICODE_SUPPORT |
92 | { | 93 | { |
93 | uni_stat_t uni_stat; | 94 | uni_stat_t uni_stat; |