diff options
author | SmallJoker <mk939@ymail.com> | 2022-01-09 18:33:37 +0100 |
---|---|---|
committer | SmallJoker <mk939@ymail.com> | 2022-01-09 18:47:12 +0100 |
commit | 8fab406c28bc5a18137d2653356c10880c827613 (patch) | |
tree | 1bdba3d565b96898802514f9c0a518be047428dd /src | |
parent | 5eb45e1ea03c6104f007efec6dd9c351f310193d (diff) | |
download | minetest-8fab406c28bc5a18137d2653356c10880c827613.tar.gz minetest-8fab406c28bc5a18137d2653356c10880c827613.tar.bz2 minetest-8fab406c28bc5a18137d2653356c10880c827613.zip |
Formspec: Fix bgcolor and set_focus checks
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/guiFormSpecMenu.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/guiFormSpecMenu.cpp b/src/gui/guiFormSpecMenu.cpp index 770a50bd9..85bd04900 100644 --- a/src/gui/guiFormSpecMenu.cpp +++ b/src/gui/guiFormSpecMenu.cpp @@ -2250,7 +2250,7 @@ void GUIFormSpecMenu::parseBox(parserData* data, const std::string &element) void GUIFormSpecMenu::parseBackgroundColor(parserData* data, const std::string &element) { std::vector<std::string> parts; - if (!precheckElement("bgcolor", element, 2, 3, parts)) + if (!precheckElement("bgcolor", element, 1, 3, parts)) return; const u32 parameter_count = parts.size(); @@ -2705,7 +2705,7 @@ bool GUIFormSpecMenu::parseStyle(parserData *data, const std::string &element, b void GUIFormSpecMenu::parseSetFocus(const std::string &element) { std::vector<std::string> parts; - if (!precheckElement("set_focus", element, 2, 2, parts)) + if (!precheckElement("set_focus", element, 1, 2, parts)) return; if (m_is_form_regenerated) |