1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00

fixed assertion if hero instance in VCMI map have 0 at one of primary skills

This commit is contained in:
AlexVinS 2017-06-06 02:01:24 +03:00
parent a3b04da5f0
commit 4b2a118ffa

View File

@ -1644,8 +1644,7 @@ void CGHeroInstance::serializeCommonOptions(JsonSerializeFormat & handler)
{ {
int value = 0; int value = 0;
handler.serializeInt(PrimarySkill::names[i], value, 0); handler.serializeInt(PrimarySkill::names[i], value, 0);
if(value != 0) pushPrimSkill(static_cast<PrimarySkill::PrimarySkill>(i), value);
pushPrimSkill(static_cast<PrimarySkill::PrimarySkill>(i), value);
} }
} }
} }