about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--analyzer/pnmpsnr.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/analyzer/pnmpsnr.c b/analyzer/pnmpsnr.c
index 1160fff6..4d23d98d 100644
--- a/analyzer/pnmpsnr.c
+++ b/analyzer/pnmpsnr.c
@@ -151,10 +151,14 @@ main (int argc, char **argv) {
     pnm_init(&argc, argv);
 
     if (argc-1 < 2) 
-        pm_error("Takes two arguments:  specifications of the two files.");
+        pm_error("Takes two arguments:  names of the two files to compare");
     else {
         filespec1 = argv[1];
         filespec2 = argv[2];
+
+        if (argc-1 > 2)
+            pm_error("Too many arguments (%u).  The only arguments are "
+                     "the names of the two files to compare", argc-1);
     }
     
     file1 = pm_openr(filespec1);