Fix problem where unknown option is not an error.
If the first option is found, then any unknown options are simply
ignored, but do not produce an error. Fixed this so that each
option found is actually verified to exist.
Bug: 27620263
Change-Id: If58732df3285eeae72188162c505e0e202fada8c
diff --git a/libc/malloc_debug/Config.cpp b/libc/malloc_debug/Config.cpp
index 4586fda3..ded618c 100644
--- a/libc/malloc_debug/Config.cpp
+++ b/libc/malloc_debug/Config.cpp
@@ -333,9 +333,9 @@
size_t value;
bool value_set;
PropertyParser parser(property_str);
- bool found = false;
bool valid = true;
while (valid && parser.Get(&property, &value, &value_set)) {
+ bool found = false;
for (size_t i = 0; i < sizeof(features)/sizeof(Feature); i++) {
if (property == features[i].name) {
if (features[i].option == 0 && features[i].combo_option) {