diff options
-rw-r--r-- | loader/modules.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/loader/modules.c b/loader/modules.c index a264a0f03..ccaa5cbff 100644 --- a/loader/modules.c +++ b/loader/modules.c @@ -391,7 +391,8 @@ static int loadModule(const char * modName, char * path, moduleList modLoaded, return rc; } -/* loads a : separated list of modules */ +/* loads a : separated list of modules. the arg only applies to the + first module in the list */ int mlLoadModuleSet(const char * origModNames, void * location, moduleList modLoaded, moduleDeps modDeps, char ** args, moduleInfoSet modInfo, int flags) { @@ -458,7 +459,9 @@ int mlLoadModuleSet(const char * origModNames, void * location, /* insert the modules now */ for (l = list, p = paths; !i && *l; l++, p++) { - if (loadModule(*l, *p, modLoaded, args, modInfo, flags)) { + if (loadModule(*l, *p, modLoaded, + !strcmp(initialList[0], *l) ? args : NULL, + modInfo, flags)) { logMessage("failed to insert %s -- bailing\n", *p); i++; } |