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)
876876 } ) ,
877877 new STFReader . TokenProcessor ( "decreasecolour" , ( ) => {
878878 stf . MustMatch ( "(" ) ;
879- stf . ReadInt ( 0 ) ;
879+ int NumColor = stf . ReadInt ( 0 ) ;
880880 if ( stf . EndOfBlock ( ) == false )
881881 {
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+ }
884892 }
885893 } ) ,
886894 new STFReader . TokenProcessor ( "ortsfont" , ( ) => { ParseFont ( stf ) ; } ) ,
You can’t perform that action at this time.
0 commit comments