Skip to content

Commit 8fab406

Browse files
committedJan 9, 2022
Formspec: Fix bgcolor and set_focus checks
1 parent 5eb45e1 commit 8fab406

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/gui/guiFormSpecMenu.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -2250,7 +2250,7 @@ void GUIFormSpecMenu::parseBox(parserData* data, const std::string &element)
22502250
void GUIFormSpecMenu::parseBackgroundColor(parserData* data, const std::string &element)
22512251
{
22522252
std::vector<std::string> parts;
2253-
if (!precheckElement("bgcolor", element, 2, 3, parts))
2253+
if (!precheckElement("bgcolor", element, 1, 3, parts))
22542254
return;
22552255

22562256
const u32 parameter_count = parts.size();
@@ -2705,7 +2705,7 @@ bool GUIFormSpecMenu::parseStyle(parserData *data, const std::string &element, b
27052705
void GUIFormSpecMenu::parseSetFocus(const std::string &element)
27062706
{
27072707
std::vector<std::string> parts;
2708-
if (!precheckElement("set_focus", element, 2, 2, parts))
2708+
if (!precheckElement("set_focus", element, 1, 2, parts))
27092709
return;
27102710

27112711
if (m_is_form_regenerated)

0 commit comments

Comments
 (0)
Please sign in to comment.