Sfoglia il codice sorgente

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 anni fa
parent
commit
d52ea1c369
1 ha cambiato i file con 5 aggiunte e 1 eliminazioni
  1. 5
    1
      app/cmScore.c

+ 5
- 1
app/cmScore.c Vedi File

@@ -800,14 +800,18 @@ cmScRC_t _cmScProcSets( cmSc_t* p )
800 800
         {
801 801
           if( cmSymTblIsValid(p->stH) )
802 802
           {
803
+
804
+            // THIS PRINTF PREVENTS CRASH ON OSX ???????
803 805
             printf("PROCSET:%i %s\n",p->sets[i].varId,ep->label);
806
+
807
+
804 808
             p->sets[i].symArray[j]     = cmSymTblRegisterFmt(p->stH,"%c-%s", _cmScVarIdToChar(p->sets[i].varId),ep->label);
805 809
             p->sets[i].costSymArray[j] = cmSymTblRegisterFmt(p->stH,"c%c-%s",_cmScVarIdToChar(p->sets[i].varId),ep->label);
806 810
           }
807 811
           else
808 812
           {
809 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 817
           p->sets[i].sectArray[j] = sp;

Loading…
Annulla
Salva