From ab26c497f5f4aca0f3fd14e70e939327fccae207 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Thu, 2 Sep 2004 16:36:39 +0000 Subject: Fix problems with stdin/stdout logic --- src/rtfx.cpp | 10 +++++++--- 1 file 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(); -- cgit v1.2.3