]> Repositorios git - scryer-prolog.git/commitdiff
Fix load_context_module triggering unreachable code in unify_atom
authorEmilie Burgun <[email protected]>
Tue, 7 Jan 2025 16:59:13 +0000 (17:59 +0100)
committerEmilie Burgun <[email protected]>
Wed, 8 Jan 2025 16:57:40 +0000 (17:57 +0100)
src/machine/dispatch.rs

index f77f7f0f184c0030f56864b191062b307af2cff3..635de289c20b241055cb127c47fb8982ee6370d8 100644 (file)
@@ -4812,11 +4812,11 @@ impl Machine {
                         step_or_fail!(self, self.machine_st.p = self.machine_st.cp);
                     }
                     &Instruction::CallLoadContextModule => {
-                        self.load_context_module(self.machine_st.registers[1]);
+                        self.load_context_module(self.deref_register(1));
                         step_or_fail!(self, self.machine_st.p += 1);
                     }
                     &Instruction::ExecuteLoadContextModule => {
-                        self.load_context_module(self.machine_st.registers[1]);
+                        self.load_context_module(self.deref_register(1));
                         step_or_fail!(self, self.machine_st.p = self.machine_st.cp);
                     }
                     &Instruction::CallLoadContextStream => {