summaryrefslogtreecommitdiff
path: root/plugin.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2003-08-30 14:52:58 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2003-08-30 14:52:58 +0200
commitcf45c66062b61e46cb796702dad85854528a3a16 (patch)
tree038daa874c94fe333e364472a8a80564bd3b0961 /plugin.c
parent7a64aeec74d48af456074d569c9405c4889f44d5 (diff)
downloadvdr-cf45c66062b61e46cb796702dad85854528a3a16.tar.gz
vdr-cf45c66062b61e46cb796702dad85854528a3a16.tar.bz2
Fixed handling extra blanks in plugin command lines
Diffstat (limited to 'plugin.c')
-rw-r--r--plugin.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugin.c b/plugin.c
index 74395348..a0d27011 100644
--- a/plugin.c
+++ b/plugin.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: plugin.c 1.9 2003/05/09 15:01:26 kls Exp $
+ * $Id: plugin.c 1.10 2003/08/30 14:52:58 kls Exp $
*/
#include "plugin.h"
@@ -170,7 +170,7 @@ bool cDll::Load(bool Log)
if (plugin && args) {
int argc = 0;
char *argv[MAXPLUGINARGS];
- char *p = args;
+ char *p = skipspace(stripspace(args));
char *q = NULL;
bool done = false;
while (!done) {
@@ -205,7 +205,7 @@ bool cDll::Load(bool Log)
}
}
if (!done)
- p++;
+ p = *p ? p + 1 : skipspace(p + 1);
}
}
argv[argc] = NULL;
@@ -278,7 +278,7 @@ void cPluginManager::AddPlugin(const char *Args)
}
return;
}
- char *s = strdup(Args);
+ char *s = strdup(skipspace(Args));
char *p = strchr(s, ' ');
if (p)
*p = 0;