Skip to content

Commit

Permalink
fix small bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Koukyosyumei committed Aug 20, 2024
1 parent a9b21aa commit 576a083
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ async fn main() {
let skip_to_runtimecode = !args.execute_entire_binary;
let target_binary = if skip_to_runtimecode {
if let Some(index) = binary.find(pattern_push0_codecopy_push0_return_invalid_push1_0x80_push1_0x40) {
info!("binary {}", binary[index..index + 10].to_string());
binary[index + 10..].to_string()
} else {
binary.clone()
Expand Down
9 changes: 8 additions & 1 deletion src/modules/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,14 @@ fn go_expr(expr: &Expr) -> Expr {
Expr::Partial(a, b, c) => Expr::Partial(simplify_props(a.clone()), b.clone(), c.clone()),
Expr::Success(a, b, c, d) => Expr::Success(simplify_props(a.clone()), b.clone(), c.clone(), d.clone()),

Expr::SLoad(slot, store) => read_storage(slot.clone(), store.clone()).unwrap(),
Expr::SLoad(slot, store) => {
let o = read_storage(slot.clone(), store.clone());
if o.is_some() {
o.unwrap()
} else {
Expr::Lit(W256(0, 0))
}
}
Expr::SStore(slot, val, store) => write_storage(slot, val, store),

Expr::ReadWord(idx_, buf_) => match (*idx_.clone(), *buf_.clone()) {
Expand Down

0 comments on commit 576a083

Please sign in to comment.