Check for existence of active when loading.
This commit is contained in:
parent
ca5ce089d2
commit
c47a15b88a
|
@ -116,7 +116,10 @@ static void load(cJSON *root)
|
|||
|
||||
s = (Structure*)self;
|
||||
|
||||
if (cJSON_GetObjectItem(root, "active"))
|
||||
{
|
||||
s->active = cJSON_GetObjectItem(root, "active")->valueint;
|
||||
}
|
||||
STRNCPY(s->requiredItem, cJSON_GetObjectItem(root, "requiredCard")->valuestring, MAX_NAME_LENGTH);
|
||||
STRNCPY(s->targetNames, cJSON_GetObjectItem(root, "targetNames")->valuestring, MAX_DESCRIPTION_LENGTH);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue