Browse Source

cmDspBuiltIn.c : Added check for an invalid initial selection value to the MsgList processor.

master
kevin 8 years ago
parent
commit
e9dc780429
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      dsp/cmDspBuiltIn.c

+ 4
- 1
dsp/cmDspBuiltIn.c View File

2613
       for(i=0; i<p->colCnt; ++i)
2613
       for(i=0; i<p->colCnt; ++i)
2614
         if( p->typeIdArray[i] == kStringTId )
2614
         if( p->typeIdArray[i] == kStringTId )
2615
           ++p->symColCnt;
2615
           ++p->symColCnt;
2616
-   
2616
+
2617
       _cmDspMsgListLoadSymbolMtx(ctx,p);
2617
       _cmDspMsgListLoadSymbolMtx(ctx,p);
2618
 
2618
 
2619
+      if( cmDspUInt( (cmDspInst_t*)p, kSelMlId ) > p->symRowCnt )
2620
+        cmErrMsg(&classPtr->err,kVarNotValidDspRC,"The default msgList selection index %i greater than the count of elements %i.",cmDspUInt( (cmDspInst_t*)p, kSelMlId ),p->symRowCnt);     
2621
+      
2619
       cmDspSetDefaultStrcz( ctx,&p->inst, kRsrcMlId,NULL, rsrcLabel); // rsrc label 
2622
       cmDspSetDefaultStrcz( ctx,&p->inst, kRsrcMlId,NULL, rsrcLabel); // rsrc label 
2620
       cmDspSetDefaultStrcz( ctx,&p->inst, kFnMlId,  NULL, fn);        // file name var
2623
       cmDspSetDefaultStrcz( ctx,&p->inst, kFnMlId,  NULL, fn);        // file name var
2621
       cmDspSetDefaultJson( ctx,&p->inst,  kListMlId,NULL, np);        // default tree
2624
       cmDspSetDefaultJson( ctx,&p->inst,  kListMlId,NULL, np);        // default tree

Loading…
Cancel
Save