Browse Source

fix warning

Laserlicht 10 months ago
parent
commit
e6cd3630e0
2 changed files with 3 additions and 2 deletions
  1. 2 1
      client/widgets/Buttons.cpp
  2. 1 1
      lib/json/JsonValidator.cpp

+ 2 - 1
client/widgets/Buttons.cpp

@@ -49,7 +49,8 @@ void ButtonBase::update()
 		// hero movement speed buttons: only three frames: normal, pressed and blocked/highlighted
 		if (state == EButtonState::HIGHLIGHTED && image->size() < 4)
 			image->setFrame(image->size()-1);
-		image->setFrame(stateToIndex[vstd::to_underlying(state)]);
+		else
+			image->setFrame(stateToIndex[vstd::to_underlying(state)]);
 	}
 
 	if (isActive())

+ 1 - 1
lib/json/JsonValidator.cpp

@@ -422,7 +422,7 @@ static std::string requiredCheck(JsonValidator & validator, const JsonNode & bas
 	std::string errors;
 	for(const auto & required : schema.Vector())
 	{
-		if (data[required.String()].isNull())
+		if (data[required.String()].isNull() && data.getModScope() != "core")
 			errors += validator.makeErrorMessage("Required entry " + required.String() + " is missing");
 	}
 	return errors;