mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-01 04:09:48 +00:00
Throw on setting tags that can't provide the setting name
This commit is contained in:
parent
162ac6a75e
commit
b0671c76d8
1 changed files with 3 additions and 0 deletions
|
@ -1097,6 +1097,9 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
tag = tag.substr(MyGuiPrefix.length());
|
tag = tag.substr(MyGuiPrefix.length());
|
||||||
size_t comma_pos = tag.find(',');
|
size_t comma_pos = tag.find(',');
|
||||||
|
if (comma_pos == std::string_view::npos)
|
||||||
|
throw std::runtime_error("Invalid setting tag (expected comma): " + std::string(tag));
|
||||||
|
|
||||||
std::string_view settingSection = tag.substr(0, comma_pos);
|
std::string_view settingSection = tag.substr(0, comma_pos);
|
||||||
std::string_view settingTag = tag.substr(comma_pos + 1, tag.length());
|
std::string_view settingTag = tag.substr(comma_pos + 1, tag.length());
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue