summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rtfx.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/rtfx.cpp b/src/rtfx.cpp
index 1fb2d2c..8239b49 100644
--- a/src/rtfx.cpp
+++ b/src/rtfx.cpp
@@ -57,7 +57,7 @@ int main(int argc, char* argv[])
argc--;
argv++;
- while(argc > 1)
+ while(argc > 0)
{
char* arg = argv[0];
if(*arg != '-')
@@ -88,7 +88,6 @@ int main(int argc, char* argv[])
argv++;
}
-
if(argc > 2)
usage();
@@ -101,7 +100,7 @@ int main(int argc, char* argv[])
// An input file
if(argc > 0)
{
- file = fopen(argv[0], "rb");
+ file = fopen(argv[0], "rb");
if(!file)
{
@@ -151,7 +150,7 @@ int main(int argc, char* argv[])
out = fopen(argv[0], "wb");
if(!out)
{
- fprintf(stderr, "rtfx: couldn't open file: %s: %s\n", argv[0], strerror(errno));
+ fprintf(stderr, "rtfx: couldn't open output file: %s: %s\n", argv[0], strerror(errno));
return 1;
}