From 948de597c341051a5ccec9e8d2df9d6d2f95b57c Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Mon, 15 Dec 2014 14:44:09 +0100 Subject: [PATCH] tvhlog: improve subsystem parser 2nd, fixes #2552 --- src/tvhlog.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/tvhlog.c b/src/tvhlog.c index 563d58ea..ff4ebe07 100644 --- a/src/tvhlog.c +++ b/src/tvhlog.c @@ -102,11 +102,12 @@ tvhlog_set_subsys ( htsmsg_t **c, const char *subsys ) while ( t ) { subsys = NULL; a = 1; - if (!*t) goto next; - if (t[0] == '+' || t[0] == '-' || t[0] <= ' ') { - a = t[0] == '+'; + while (*t && (*t == '+' || *t == '-' || *t <= ' ')) { + if (*t > ' ') + a = *t == '+'; t++; } + if (!*t) goto next; if (!strcmp(t, "all")) { if (*c) htsmsg_destroy(*c);