1
0

Fix lists

This commit is contained in:
Jeff 2024-09-24 13:51:04 -04:00
parent c1eccf049f
commit 85241c04b9

View File

@ -101,9 +101,11 @@ impl Vm {
}
Operation::LoadList => {
let to_register = instruction.destination();
let length = instruction.first_argument();
let first_register = to_register - length - 1;
let last_register = to_register - 1;
let first_register = instruction.first_argument();
let length = instruction.second_argument();
let last_register = first_register + length + 1;
println!("{first_register}..={last_register}");
let mut list = Vec::with_capacity(length as usize);