Use MAX_DESCRIPTION_LENGTH to prevent target name truncation.

This commit is contained in:
Steve 2018-03-03 16:04:40 +00:00
parent 6ba888436b
commit fca87f6575
1 changed files with 1 additions and 1 deletions

View File

@ -144,7 +144,7 @@ static void load(cJSON *root)
s = (Structure*)self;
s->requiredPower = cJSON_GetObjectItem(root, "requiredPower")->valueint;
STRNCPY(s->targetNames, cJSON_GetObjectItem(root, "targetNames")->valuestring, MAX_NAME_LENGTH);
STRNCPY(s->targetNames, cJSON_GetObjectItem(root, "targetNames")->valuestring, MAX_DESCRIPTION_LENGTH);
}
static void save(cJSON *root)