mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-17 00:07:41 +02:00
Fixed a few CWE-457
This commit is contained in:
@ -486,12 +486,22 @@ JsonNode addMeta(JsonNode config, std::string meta)
|
||||
return config;
|
||||
}
|
||||
|
||||
CModInfo::CModInfo():
|
||||
checksum(0),
|
||||
enabled(false),
|
||||
validation(PENDING)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
CModInfo::CModInfo(std::string identifier,const JsonNode & local, const JsonNode & config):
|
||||
identifier(identifier),
|
||||
name(config["name"].String()),
|
||||
description(config["description"].String()),
|
||||
dependencies(config["depends"].convertTo<std::set<std::string> >()),
|
||||
conflicts(config["conflicts"].convertTo<std::set<std::string> >()),
|
||||
checksum(0),
|
||||
enabled(false),
|
||||
validation(PENDING),
|
||||
config(addMeta(config, identifier))
|
||||
{
|
||||
@ -554,6 +564,10 @@ void CModInfo::loadLocalData(const JsonNode & data)
|
||||
|
||||
CModHandler::CModHandler()
|
||||
{
|
||||
modules.COMMANDERS = false;
|
||||
modules.STACK_ARTIFACT = false;
|
||||
modules.STACK_EXP = false;
|
||||
modules.MITHRIL = false;
|
||||
for (int i = 0; i < GameConstants::RESOURCE_QUANTITY; ++i)
|
||||
{
|
||||
identifiers.registerObject("core", "resource", GameConstants::RESOURCE_NAMES[i], i);
|
||||
|
Reference in New Issue
Block a user