浏览代码

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

master
kevin 8 年前
父节点
当前提交
e9dc780429
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4
    1
      dsp/cmDspBuiltIn.c

+ 4
- 1
dsp/cmDspBuiltIn.c 查看文件

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

正在加载...
取消
保存