Use flag name without 'no' prefix only if it exists
Before this change it was impossible to use flag names that start with "no", e.g. --noise_file
BUG=webrtc:8202
Review-Url: https://codereview.webrtc.org/3004363002
Cr-Original-Commit-Position: refs/heads/master@{#19678}
Cr-Mirrored-From: https://chromium.googlesource.com/external/webrtc
Cr-Mirrored-Commit: 31377a2a103f040c3c4f0b1947d69657233c21a2
diff --git a/rtc_base/flags.cc b/rtc_base/flags.cc
index a245cec..b5697f1 100644
--- a/rtc_base/flags.cc
+++ b/rtc_base/flags.cc
@@ -149,7 +149,7 @@
arg++; // remove 1st '-'
if (*arg == '-')
arg++; // remove 2nd '-'
- if (arg[0] == 'n' && arg[1] == 'o') {
+ if (arg[0] == 'n' && arg[1] == 'o' && Lookup(arg + 2)) {
arg += 2; // remove "no"
*is_bool = true;
}