@@ -86,7 +86,8 @@ fn od_format_type(type_char: FormatType, byte_size: u8) -> Option<FormatterItemI
8686 ( FormatType :: HexadecimalInt , 8 ) => Some ( FORMAT_ITEM_HEX64 ) ,
8787
8888 ( FormatType :: Float , 2 ) => Some ( FORMAT_ITEM_F16 ) ,
89- ( FormatType :: Float , 0 | 4 ) => Some ( FORMAT_ITEM_F32 ) ,
89+ ( FormatType :: Float , 4 ) => Some ( FORMAT_ITEM_F32 ) ,
90+ ( FormatType :: Float , 0 ) => Some ( FORMAT_ITEM_F64 ) ,
9091 ( FormatType :: Float , 8 ) => Some ( FORMAT_ITEM_F64 ) ,
9192 ( FormatType :: Float , 16 ) => Some ( FORMAT_ITEM_LONG_DOUBLE ) ,
9293
@@ -521,7 +522,7 @@ fn test_long_format_x_default() {
521522fn test_long_format_f_default ( ) {
522523 assert_eq ! (
523524 parse_format_flags_str( & [ "od" , "--format=f" ] ) . unwrap( ) ,
524- vec![ FORMAT_ITEM_F32 ]
525+ vec![ FORMAT_ITEM_F64 ]
525526 ) ;
526527}
527528
@@ -587,7 +588,7 @@ fn test_mixed_formats() {
587588 ParsedFormatterItemInfo :: new( FORMAT_ITEM_HEX8 , false ) , // tx1
588589 ParsedFormatterItemInfo :: new( FORMAT_ITEM_DEC16U , false ) , // tu2
589590 ParsedFormatterItemInfo :: new( FORMAT_ITEM_C , false ) , // tc
590- ParsedFormatterItemInfo :: new( FORMAT_ITEM_F32 , false ) , // tf
591+ ParsedFormatterItemInfo :: new( FORMAT_ITEM_F64 , false ) , // tf
591592 ParsedFormatterItemInfo :: new( FORMAT_ITEM_HEX16 , false ) , // x
592593 ]
593594 ) ;
0 commit comments