added table get

This commit is contained in:
afonya2 2025-06-03 19:51:19 +02:00
parent 4faabe0d9c
commit 9b0335e8d6
Signed by: afonya
GPG key ID: EBB9C4CAFAAFB2DC
5 changed files with 54 additions and 4 deletions

View file

@ -44,8 +44,7 @@ pub struct VMMemoryTable {
#[derive(Debug, Clone)]
pub struct TableValue {
pub key: VMMemory,
pub value: VMMemory,
pub pos: usize
pub value: VMMemory
}
#[derive(Debug, Clone)]
@ -196,7 +195,7 @@ fn set_mem_tbl_val(tbl: &mut VMMemoryTable, key: VMMemory, value: VMMemory) {
return;
}
}
tbl.values.push(TableValue { key, value, pos: tbl.values.len() });
tbl.values.push(TableValue { key, value });
}
fn get_mem_tbl_val(tbl: &VMMemoryTable, key: VMMemory) -> Option<&VMMemory> {
@ -423,6 +422,7 @@ fn load_func(data: Vec<u8>, offset: &mut usize) -> DecompiledFunction {
arg3: arg3 as u8,
});
}
println!("Variables: {:?}", variables);
return DecompiledFunction {
body: body,
variables: variables,