diff --git a/procinterrupts.c b/procinterrupts.c index e372671..9015177 100644 --- a/procinterrupts.c +++ b/procinterrupts.c @@ -178,10 +178,12 @@ void init_irq_class_and_type(char *savedline, struct irq_info *info, int irq) } #ifdef AARCH64 - snprintf(irq_fullname, PATH_MAX, "%s %s", last_token, savedptr); - tmp = strchr(irq_fullname, '\n'); - if (tmp) - *tmp = 0; + if (strlen(savedptr) > 0) { + snprintf(irq_fullname, PATH_MAX, "%s %s", last_token, savedptr); + tmp = strchr(irq_fullname, '\n'); + if (tmp) + *tmp = 0; + } #else snprintf(irq_fullname, PATH_MAX, "%s", last_token); #endif