cmScore.c : Fixed bug in _cmScParseFile() where _cmScParseSectionColumn()
overwrote 'rc' and thereby prevented the functio from returning the correct result code on fail.
This commit is contained in:
parent
c809469b62
commit
e6933b61d2
@ -1306,27 +1306,30 @@ cmScRC_t _cmScParseFile( cmSc_t* p, cmCtx_t* ctx, const cmChar_t* fn )
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( secs != DBL_MAX )
|
if( rc == kOkScRC )
|
||||||
cur_secs = secs;
|
|
||||||
|
|
||||||
// form the section list
|
|
||||||
if( j > 0 )
|
|
||||||
if((rc = _cmScParseSectionColumn(p,i,j-1,p->sectList)) != kOkScRC )
|
|
||||||
break;
|
|
||||||
|
|
||||||
// the bar lines don't have times so set the time of the bar line to the
|
|
||||||
// time of the first event in the bar.
|
|
||||||
if( barEvtIdx != cmInvalidIdx && secs != DBL_MAX )
|
|
||||||
{
|
{
|
||||||
assert( p->array[ barEvtIdx ].type == kBarEvtScId );
|
if( secs != DBL_MAX )
|
||||||
p->array[ barEvtIdx ].secs = secs;
|
cur_secs = secs;
|
||||||
|
|
||||||
// handle the case where the previous bar had no events
|
// form the section list
|
||||||
// BUG BUG BUG this is a hack which will fail if the first bar does not have events.
|
if( j > 0 )
|
||||||
if( barEvtIdx>=1 && p->array[ barEvtIdx-1].type == kBarEvtScId )
|
if((rc = _cmScParseSectionColumn(p,i,j-1,p->sectList)) != kOkScRC )
|
||||||
p->array[ barEvtIdx-1].secs = secs;
|
break;
|
||||||
|
|
||||||
barEvtIdx = cmInvalidIdx;
|
// the bar lines don't have times so set the time of the bar line to the
|
||||||
|
// time of the first event in the bar.
|
||||||
|
if( barEvtIdx != cmInvalidIdx && secs != DBL_MAX )
|
||||||
|
{
|
||||||
|
assert( p->array[ barEvtIdx ].type == kBarEvtScId );
|
||||||
|
p->array[ barEvtIdx ].secs = secs;
|
||||||
|
|
||||||
|
// handle the case where the previous bar had no events
|
||||||
|
// BUG BUG BUG this is a hack which will fail if the first bar does not have events.
|
||||||
|
if( barEvtIdx>=1 && p->array[ barEvtIdx-1].type == kBarEvtScId )
|
||||||
|
p->array[ barEvtIdx-1].secs = secs;
|
||||||
|
|
||||||
|
barEvtIdx = cmInvalidIdx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user