Account start function in gas func patching.

This commit is contained in:
Sergey Pepyakin 2018-12-24 19:28:53 +01:00
parent 3db0d60e70
commit 471a9b3fcc

View File

@ -251,6 +251,9 @@ pub fn inject_gas_counter(module: elements::Module, rules: &rules::Set)
}
}
},
&mut elements::Section::Start(ref mut start_idx) => {
if *start_idx >= gas_func { *start_idx += 1}
},
_ => { }
}
}