summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/deh_main.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/deh_main.c b/src/deh_main.c
index 5da6b0bf..8f82b5bb 100644
--- a/src/deh_main.c
+++ b/src/deh_main.c
@@ -335,16 +335,22 @@ static void DEH_ParseFile(char *filename)
void DEH_Init(void)
{
- int argc;
+ int p;
InitialiseSections();
- argc = M_CheckParm("-deh");
+ p = M_CheckParm("-deh");
- if (argc > 0)
+ if (p > 0)
{
- printf(" loading %s\n", myargv[argc+1]);
- DEH_ParseFile(myargv[argc+1]);
+ ++p;
+
+ while (p < myargc && myargv[p][0] != '-')
+ {
+ printf(" loading %s\n", myargv[p]);
+ DEH_ParseFile(myargv[p]);
+ ++p;
+ }
}
}