Skip to content

FormatOptions always_show_scale doesn't always work #743

@dbalsom

Description

@dbalsom

using

pub fn format_instruction(iced_i: &iced_x86::Instruction) -> String {
    let mut instr_text = String::new();
    let mut formatter = NasmFormatter::new();

    formatter.options_mut().set_always_show_segment_register(true);
    formatter.options_mut().set_add_leading_zero_to_hex_numbers(false);
    formatter.options_mut().set_always_show_scale(false);

    formatter.format(&iced_i, &mut instr_text);
    instr_text
}

I would have assumed this should eliminate scale *1 entries from appearing in disassembly.
yet disassembling [67, 80, 04, 2D, 49, 30, 00, 00, 05] still produces add byte [ds:ebp*1+3049h],5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions