mirror of
https://github.com/pezkuwichain/wasm-instrument.git
synced 2026-04-27 23:17:57 +00:00
fix with indirect calls for gas injector
This commit is contained in:
+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