Avoid infinite recursion when the alias changes only the section name.

This commit is contained in:
John Ralls 2021-07-13 09:46:48 -07:00
parent 7885353fe3
commit 29a2365fdf

View File

@ -227,7 +227,7 @@ GncOptionDB::find_option(const std::string& section, const char* name) const
* nullptr. GncOptionSection::find_option already checked if the alias
* should have been in the same section.
*/
if (alias && alias->first)
if (alias && alias->first && section != alias->first)
return find_option(alias->first, alias->second);
return nullptr;
}