diff options
Diffstat (limited to 'src/modules/systemlib')
-rw-r--r-- | src/modules/systemlib/param/param.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/modules/systemlib/param/param.c b/src/modules/systemlib/param/param.c index 7ff71a802..926ae75a7 100644 --- a/src/modules/systemlib/param/param.c +++ b/src/modules/systemlib/param/param.c @@ -504,15 +504,22 @@ param_reset_excludes(const char* excludes[], int num_excludes) for (param = 0; handle_in_range(param); param++) { const char* name = param_name(param); + bool exclude = false; + + for (int index = 0; index < num_excludes; index ++) { + int len = strlen(excludes[index]); - for (int index = 0, len = strlen(excludes[index]); index < num_excludes; index ++) { if((excludes[index][len - 1] == '*' - && strncmp(name, excludes[index], len - 1)) == 0 + && strncmp(name, excludes[index], len - 1) == 0) || strcmp(name, excludes[index]) == 0) { - - param_reset(param); + exclude = true; + break; } } + + if(!exclude) { + param_reset(param); + } } param_unlock(); |