Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reading can panic on invalid operands #9

Open
ExpHP opened this issue Jan 5, 2020 · 0 comments
Open

Reading can panic on invalid operands #9

ExpHP opened this issue Jan 5, 2020 · 0 comments

Comments

@ExpHP
Copy link

ExpHP commented Jan 5, 2020

fn main() {
    println!("{:?}", x86asm::InstructionReader::new(
        &[0x6c, 0x90][..],
        x86asm::Mode::Protected,
    ).read());
}
thread 'main' panicked at 'Invalid operand definition.', C:\Users\diago\.cargo\registry\src\github.com-1ecc6299db9ec823\x86asm-0.1.0\src\decoding.rs:322:26

It's not entirely clear to me why this panics, rather than returning Err.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant