Skip to content

Commit

Permalink
Merge pull request #6 from Jon-Becker/fix/regex-matching
Browse files Browse the repository at this point in the history
fix: bytecode regex overlap with address regex
  • Loading branch information
Jon-Becker committed Jul 13, 2022
2 parents df85da2 + c3f9cfd commit 0ccc224
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions common/src/ether/evm/disassemble.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,7 @@ pub fn disassemble(args: DisassemblerArgs) {
}

let contract_bytecode: String;
if BYTECODE_REGEX.is_match(&args.target) {
contract_bytecode = args.target.clone();
}
else if ADDRESS_REGEX.is_match(&args.target) {
if ADDRESS_REGEX.is_match(&args.target) {

// push the address to the output directory
if &output_dir != &args.output {
Expand Down Expand Up @@ -120,6 +117,9 @@ pub fn disassemble(args: DisassemblerArgs) {
});

}
else if BYTECODE_REGEX.is_match(&args.target) {
contract_bytecode = args.target.clone();
}
else {

// push the address to the output directory
Expand Down

0 comments on commit 0ccc224

Please sign in to comment.