fix arg/3 bug

This commit is contained in:
Mark Thom
2021-11-21 13:25:24 -07:00
parent 3355b49724
commit 073f281f1e
3 changed files with 4 additions and 8 deletions

View File

@@ -2974,7 +2974,7 @@ impl MachineState {
// arg(+N, +Term, ?Arg)
pub fn try_arg(&mut self) -> CallResult {
let stub_gen = || functor_stub(atom!("arg"), 3);
let n = self.registers[1]; //self.store(self.deref(self.registers[1])); // TODO: necessary?
let n = self.store(self.deref(self.registers[1]));
read_heap_cell!(n,
(HeapCellValueTag::Var | HeapCellValueTag::AttrVar | HeapCellValueTag::StackVar) => {