replaced MAXMSG with MAXID
added a check if demandName is too long
This commit is contained in:
mariosmsk
2019-03-26 17:19:08 +02:00
parent 8c5e383692
commit 08799eb276
2 changed files with 7 additions and 4 deletions

View File

@@ -742,7 +742,7 @@ int demanddata(Project *pr)
// with what is specified in this section
demand->Base = y;
demand->Pat = p;
demand->Name = xstrcpy(&demand->Name, parser->Comment, MAXMSG);
demand->Name = xstrcpy(&demand->Name, parser->Comment, MAXID);
hyd->NodeDemand[j] = MISSING; // marker - next iteration will append a new category.
}
@@ -755,7 +755,7 @@ int demanddata(Project *pr)
if (demand == NULL) return 101;
demand->Base = y;
demand->Pat = p;
demand->Name = xstrcpy(&demand->Name, parser->Comment, MAXMSG);
demand->Name = xstrcpy(&demand->Name, parser->Comment, MAXID);
demand->next = NULL;
cur_demand->next = demand;
}