Skip to content

Commit

Permalink
Fix wrong comparison test in addOption
Browse files Browse the repository at this point in the history
It means the test is mainly false, then the config file is rewritten at each startup !
  • Loading branch information
GregAscolab committed Sep 5, 2024
1 parent 77fe5d3 commit 19260f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SetupConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ class SetupConfigurator
key += numOptions ;

// If key is present and value is the same, we don't need to create/update it.
if (doc.containsKey(key.c_str()) && doc[key] != val)
if (doc.containsKey(key.c_str()) && doc[key] == val)
return;

// if min, max, step != from default, treat this as object in order to set other properties
Expand Down

1 comment on commit 19260f4

@cotestatnt
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!
What a stupid mistake I didn't notice

Please sign in to comment.