From 87453a54faef32daeac5b46cf385b6c9767d80e4 Mon Sep 17 00:00:00 2001 From: Lukas Cone Date: Sat, 26 Feb 2022 16:26:00 +0100 Subject: [PATCH] patterns: add std::mem::find_sequence_in_range (#32) --- includes/std/mem.pat | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/std/mem.pat b/includes/std/mem.pat index f3a5a49..4569a31 100644 --- a/includes/std/mem.pat +++ b/includes/std/mem.pat @@ -22,9 +22,12 @@ namespace std::mem { }; fn find_sequence(u128 occurrence_index, auto ... bytes) { - return builtin::std::mem::find_sequence(occurrence_index, bytes); + return builtin::std::mem::find_sequence_in_range(occurrence_index, builtin::std::mem::base_address(), builtin::std::mem::size(), bytes); }; + fn find_sequence_in_range(u128 occurrence_index, u128 offsetFrom, u128 offsetTo, auto ... bytes) { + return builtin::std::mem::find_sequence_in_range(occurrence_index, offsetFrom, offsetTo, bytes); + }; fn read_unsigned(u128 address, u8 size) { return builtin::std::mem::read_unsigned(address, size);