summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2004-09-02 16:36:39 +0000
committerStef Walter <stef@memberwebs.com>2004-09-02 16:36:39 +0000
commitab26c497f5f4aca0f3fd14e70e939327fccae207 (patch)
tree62989a64b922b770652e70087a7d8456f928220f
parentcc0046b7e7e191443a027a8f1f38855726ae2871 (diff)
Fix problems with stdin/stdout logic
-rw-r--r--src/rtfx.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/rtfx.cpp b/src/rtfx.cpp
index bb26777..1fb2d2c 100644
--- a/src/rtfx.cpp
+++ b/src/rtfx.cpp
@@ -54,11 +54,11 @@ int main(int argc, char* argv[])
{
XmlComposerOptions options;
+ argc--;
+ argv++;
+
while(argc > 1)
{
- argc--;
- argv++;
-
char* arg = argv[0];
if(*arg != '-')
break;
@@ -83,8 +83,12 @@ int main(int argc, char* argv[])
if(arg == NULL)
break;
+
+ argc--;
+ argv++;
}
+
if(argc > 2)
usage();