cmScore.c : Fixed apparent bug where p->sets[i].symArray[] was assigned

twice and p->sets[i].costSymArray[] was not assigned at all in _cmScProcSets().

Added a printf() which mysteriously prevents an OS-X Crash in _cmScProcSets().
This commit is contained in:
kevin 2013-09-28 12:28:54 -07:00
parent 46a3bcfc9f
commit d52ea1c369

View File

@ -800,14 +800,18 @@ cmScRC_t _cmScProcSets( cmSc_t* p )
{
if( cmSymTblIsValid(p->stH) )
{
// THIS PRINTF PREVENTS CRASH ON OSX ???????
printf("PROCSET:%i %s\n",p->sets[i].varId,ep->label);
p->sets[i].symArray[j] = cmSymTblRegisterFmt(p->stH,"%c-%s", _cmScVarIdToChar(p->sets[i].varId),ep->label);
p->sets[i].costSymArray[j] = cmSymTblRegisterFmt(p->stH,"c%c-%s",_cmScVarIdToChar(p->sets[i].varId),ep->label);
}
else
{
p->sets[i].symArray[j] = cmInvalidId;
p->sets[i].symArray[j] = cmInvalidId;
p->sets[i].costSymArray[j] = cmInvalidId;
}
p->sets[i].sectArray[j] = sp;