Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Formspec: Fix bgcolor and set_focus checks
  • Loading branch information
SmallJoker committed Jan 9, 2022
1 parent 5eb45e1 commit 8fab406
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gui/guiFormSpecMenu.cpp
Expand Up @@ -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();
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 8fab406

Please sign in to comment.