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

This commit is contained in:
kevin 2016-05-19 13:01:54 -04:00
parent 74acab1539
commit e9dc780429

View File

@ -2616,6 +2616,9 @@ cmDspInst_t* _cmDspMsgListAlloc(cmDspCtx_t* ctx, cmDspClass_t* classPtr, unsign
_cmDspMsgListLoadSymbolMtx(ctx,p); _cmDspMsgListLoadSymbolMtx(ctx,p);
if( cmDspUInt( (cmDspInst_t*)p, kSelMlId ) > p->symRowCnt )
cmErrMsg(&classPtr->err,kVarNotValidDspRC,"The default msgList selection index %i greater than the count of elements %i.",cmDspUInt( (cmDspInst_t*)p, kSelMlId ),p->symRowCnt);
cmDspSetDefaultStrcz( ctx,&p->inst, kRsrcMlId,NULL, rsrcLabel); // rsrc label cmDspSetDefaultStrcz( ctx,&p->inst, kRsrcMlId,NULL, rsrcLabel); // rsrc label
cmDspSetDefaultStrcz( ctx,&p->inst, kFnMlId, NULL, fn); // file name var cmDspSetDefaultStrcz( ctx,&p->inst, kFnMlId, NULL, fn); // file name var
cmDspSetDefaultJson( ctx,&p->inst, kListMlId,NULL, np); // default tree cmDspSetDefaultJson( ctx,&p->inst, kListMlId,NULL, np); // default tree