Fix logic of checkbox formspec element validity checking

This commit is contained in:
Kahrl 2015-01-09 16:57:54 +01:00
parent 63867b1a37
commit 2ab97a7821

@ -385,7 +385,7 @@ void GUIFormSpecMenu::parseCheckbox(parserData* data,std::string element)
{ {
std::vector<std::string> parts = split(element,';'); std::vector<std::string> parts = split(element,';');
if (((parts.size() >= 3) || (parts.size() <= 4)) || if (((parts.size() >= 3) && (parts.size() <= 4)) ||
((parts.size() > 4) && (m_formspec_version > FORMSPEC_API_VERSION))) ((parts.size() > 4) && (m_formspec_version > FORMSPEC_API_VERSION)))
{ {
std::vector<std::string> v_pos = split(parts[0],','); std::vector<std::string> v_pos = split(parts[0],',');