fix panic in current_prolog_flag/2 when arguments are the same variable

This commit is contained in:
no382001
2026-03-31 09:48:23 +02:00
parent 79a9b950cb
commit 6a10c6d6a5
3 changed files with 12 additions and 4 deletions

View File

@@ -9233,10 +9233,9 @@ impl Machine {
#[inline(always)]
pub(crate) fn is_sto_enabled(&mut self) {
self.machine_st.unify_atom(
self.machine_st.occurs_check.flag_value(),
self.machine_st.registers[1],
);
let a1 = self.deref_register(1);
self.machine_st
.unify_atom(self.machine_st.occurs_check.flag_value(), a1);
}
#[inline(always)]