mirror of
https://github.com/pezkuwichain/wasm-instrument.git
synced 2026-11-12 13:47:14 +00:00
fix with indirect calls for gas injector
This commit is contained in:
1 parent
b6bcd86ae1
commit
80687d470c
2 files changed
+13
-5
No files matched your search
+9
-1
@@ -94,7 +94,15 @@ fn main() {
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
&mut elements::Section::Element(ref mut elements_section) => {
|
||||
for ref mut segment in elements_section.entries_mut() {
|
||||
// update all indirect call addresses initial values
|
||||
for func_index in segment.members_mut() {
|
||||
if *func_index >= gas_func { *func_index += 1}
|
||||
}
|
||||
}
|
||||
},
|
||||
_ => { }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user