File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -460,17 +460,17 @@ impl BinaryData for JudgeLine {
460460
461461impl BinaryData for ChartSettings {
462462 fn read_binary < R : Read > ( r : & mut BinaryReader < R > ) -> Result < Self > {
463+ let pe_byte = r. read :: < u8 > ( ) ?;
463464 Ok ( Self {
464- pe_alpha_extension : r . read :: < u8 > ( ) ? == 1 ,
465+ pe_alpha_extension : pe_byte & 1 != 0 ,
465466 hold_partial_cover : r. read :: < u8 > ( ) ? == 1 ,
466- line_reference_y_axis : r . read :: < u8 > ( ) ? == 1 ,
467+ line_reference_y_axis : pe_byte >> 1 & 1 != 0 ,
467468 } )
468469 }
469470
470471 fn write_binary < W : Write > ( & self , w : & mut BinaryWriter < W > ) -> Result < ( ) > {
471- w. write_val ( self . pe_alpha_extension as u8 ) ?;
472+ w. write_val ( ( self . pe_alpha_extension as u8 ) | ( ( self . line_reference_y_axis as u8 ) << 1 ) ) ?;
472473 w. write_val ( self . hold_partial_cover as u8 ) ?;
473- w. write_val ( self . line_reference_y_axis as u8 ) ?;
474474 Ok ( ( ) )
475475 }
476476}
You can’t perform that action at this time.
0 commit comments