From 28ba9a369eb9a067518a29cbf384a33c8b11927d Mon Sep 17 00:00:00 2001 From: dan sinclair Date: Wed, 8 Jul 2020 15:28:26 +0000 Subject: [PATCH] Fixup format parsing in sample app. This Cl fixes up the format parsing so it doesn't get recognized as an invalid option. Change-Id: I92626830ef36c3de5908edeb8900afd5807b31b0 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/24520 Reviewed-by: Ryan Harrison --- samples/main.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/samples/main.cc b/samples/main.cc index f16548b049..674f3c4857 100644 --- a/samples/main.cc +++ b/samples/main.cc @@ -146,8 +146,7 @@ bool ParseArgs(const std::vector& args, Options* opts) { std::cerr << "Unknown output format: " << args[i] << std::endl; return false; } - } - if (arg == "-o" || arg == "--output-name") { + } else if (arg == "-o" || arg == "--output-name") { ++i; if (i >= args.size()) { std::cerr << "Missing value for " << arg << std::endl;