]> Repositorios git - scryer-prolog.git/commitdiff
correct cycle detection in ground/1 (#2073)
authorMark <[email protected]>
Tue, 3 Oct 2023 18:04:10 +0000 (12:04 -0600)
committerMark <[email protected]>
Tue, 3 Oct 2023 18:07:36 +0000 (12:07 -0600)
src/machine/machine_state_impl.rs

index 34b9d55a5f1a5e6d5e5f529210b74ad4e333dbec..c8d7a4dc2431a8443b254d91d96f693a98e60919 100644 (file)
@@ -1648,7 +1648,7 @@ impl MachineState {
                 }
             }
 
-            if value.is_compound(iter.heap) {
+            if value.is_ref() {
                 if visited.contains(&value) {
                     for _ in stack_len..iter.stack_len() {
                         iter.pop_stack();
@@ -1686,7 +1686,7 @@ impl MachineState {
                         },
                         Ok(Number::Integer(n)) => {
                             let b: u8 = (&*n).try_into().unwrap();
-                            
+
                             bytes.push(b);
                         }
                         _ => {}