Browse Source

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().
master
kevin 11 years ago
parent
commit
d52ea1c369
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      app/cmScore.c

+ 5
- 1
app/cmScore.c View File

800
         {
800
         {
801
           if( cmSymTblIsValid(p->stH) )
801
           if( cmSymTblIsValid(p->stH) )
802
           {
802
           {
803
+
804
+            // THIS PRINTF PREVENTS CRASH ON OSX ???????
803
             printf("PROCSET:%i %s\n",p->sets[i].varId,ep->label);
805
             printf("PROCSET:%i %s\n",p->sets[i].varId,ep->label);
806
+
807
+
804
             p->sets[i].symArray[j]     = cmSymTblRegisterFmt(p->stH,"%c-%s", _cmScVarIdToChar(p->sets[i].varId),ep->label);
808
             p->sets[i].symArray[j]     = cmSymTblRegisterFmt(p->stH,"%c-%s", _cmScVarIdToChar(p->sets[i].varId),ep->label);
805
             p->sets[i].costSymArray[j] = cmSymTblRegisterFmt(p->stH,"c%c-%s",_cmScVarIdToChar(p->sets[i].varId),ep->label);
809
             p->sets[i].costSymArray[j] = cmSymTblRegisterFmt(p->stH,"c%c-%s",_cmScVarIdToChar(p->sets[i].varId),ep->label);
806
           }
810
           }
807
           else
811
           else
808
           {
812
           {
809
             p->sets[i].symArray[j] = cmInvalidId;
813
             p->sets[i].symArray[j] = cmInvalidId;
810
-            p->sets[i].symArray[j] = cmInvalidId;
814
+            p->sets[i].costSymArray[j] = cmInvalidId;
811
           }
815
           }
812
 
816
 
813
           p->sets[i].sectArray[j] = sp;
817
           p->sets[i].sectArray[j] = sp;

Loading…
Cancel
Save