File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -876,11 +876,19 @@ public CVCDigital(STFReader stf, string basepath)
876
876
} ) ,
877
877
new STFReader . TokenProcessor ( "decreasecolour" , ( ) => {
878
878
stf . MustMatch ( "(" ) ;
879
- stf . ReadInt ( 0 ) ;
879
+ int NumColor = stf . ReadInt ( 0 ) ;
880
880
if ( stf . EndOfBlock ( ) == false )
881
881
{
882
- stf . ParseBlock ( new STFReader . TokenProcessor [ ] {
883
- new STFReader . TokenProcessor ( "controlcolour" , ( ) => { DecreaseColor = ParseControlColor ( stf ) ; } ) } ) ;
882
+ if ( NumColor == 0 )
883
+ {
884
+ // no. of colors is set as 0 and therefor no color is defined, but if set anyway, it must be skipped
885
+ stf . SkipRestOfBlock ( ) ;
886
+ }
887
+ else
888
+ {
889
+ stf . ParseBlock ( new STFReader . TokenProcessor [ ] {
890
+ new STFReader . TokenProcessor ( "controlcolour" , ( ) => { DecreaseColor = ParseControlColor ( stf ) ; } ) } ) ;
891
+ }
884
892
}
885
893
} ) ,
886
894
new STFReader . TokenProcessor ( "ortsfont" , ( ) => { ParseFont ( stf ) ; } ) ,
You can’t perform that action at this time.
0 commit comments