From 8cf33bc76455afda7c65f61e70899754a6186d2c Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Tue, 19 Aug 2014 14:22:19 -0700 Subject: Fixed command line parting when no output is needed. R=bo_xu@foxitsoftware.com Review URL: https://codereview.chromium.org/492523002 --- samples/pdfium_test.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/samples/pdfium_test.cc b/samples/pdfium_test.cc index 9a6513dc10..e92d7a1250 100644 --- a/samples/pdfium_test.cc +++ b/samples/pdfium_test.cc @@ -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) -- cgit v1.2.3