Fixed command line parting when no output is needed.
authorVitaly Buka <vitalybuka@chromium.org>
Tue, 19 Aug 2014 21:22:19 +0000 (14:22 -0700)
committerVitaly Buka <vitalybuka@chromium.org>
Tue, 19 Aug 2014 21:22:19 +0000 (14:22 -0700)
R=bo_xu@foxitsoftware.com

Review URL: https://codereview.chromium.org/492523002

samples/pdfium_test.cc

index 9a6513d..e92d7a1 100644 (file)
@@ -198,7 +198,8 @@ bool ParseCommandLine(int argc, const char* argv[], OutputFormat* output_format,
     if (strcmp(argv[cur_arg], "--bmp") == 0)
       *output_format = OUTPUT_BMP;
 #endif
-    cur_arg++;
+    if (*output_format != OUTPUT_NONE)
+      cur_arg++;
   }
 
   if (cur_arg >= argc)