[−][src]Function raptor::analysis::constants::replace_expression
pub fn replace_expression<V: Value>(
haystack: &Expression<V>,
needle: &Expression<V>,
expr: &Expression<V>
) -> Result<Expression<V>>
We need a special replace function here to make sure we don't replace expressions inside references.
Take a stack variable, var_0x8:32 for example, and give it a value of 16. If we replaced var_0x8:32 inside a reference, we would turn &(var_0x8:32) into &(0x10:32), which is not what we want.