diff options
author | Christopher Ferris <cferris@google.com> | 2016-03-14 15:29:46 -0700 |
---|---|---|
committer | Christopher Ferris <cferris@google.com> | 2016-03-14 15:34:22 -0700 |
commit | a4b14252752d14454afb48feb3272e8689e3a66d (patch) | |
tree | 939fc4e7324147dd97d0e54d9383bb1758ec8848 /libc/malloc_debug/Config.cpp | |
parent | 0e00c168cea9c951df5ce47d25d8f042b9cc566a (diff) |
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
Diffstat (limited to 'libc/malloc_debug/Config.cpp')
-rw-r--r-- | libc/malloc_debug/Config.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/malloc_debug/Config.cpp b/libc/malloc_debug/Config.cpp index 4586fda3b..ded618c4c 100644 --- a/libc/malloc_debug/Config.cpp +++ b/libc/malloc_debug/Config.cpp @@ -333,9 +333,9 @@ bool Config::SetFromProperties() { 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) { |