cmXScore.c : Added error checking to section marker text-to-number conversion.
This commit is contained in:
parent
84c5097a8d
commit
1a042843c8
@ -1376,8 +1376,18 @@ void _cmXScoreSetMeasGroups( cmXScore_t* p, unsigned flag )
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( cmIsFlag(np->flags,kSectionXsFl) )
|
if( cmIsFlag(np->flags,kSectionXsFl) )
|
||||||
sectionId = np->tvalue==NULL ? 0 : strtol(np->tvalue,NULL,10);
|
{
|
||||||
|
sectionId = 0;
|
||||||
|
|
||||||
|
if( np->tvalue == NULL )
|
||||||
|
cmErrWarnMsg(&p->err,kSyntaxErrorXsRC,"An apparent section label in measure '%i' is blank.",np->meas->number);
|
||||||
|
else
|
||||||
|
if( cmTextToUInt( np->tvalue, §ionId, NULL ) != kOkTxRC )
|
||||||
|
cmErrWarnMsg(&p->err,kSyntaxErrorXsRC,"The section label '%s' is not an integer.",np->tvalue);
|
||||||
|
|
||||||
|
//sectionId = np->tvalue==NULL ? 0 : strtol(np->tvalue,NULL,10);
|
||||||
|
}
|
||||||
|
|
||||||
n0 = NULL;
|
n0 = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user