]> Repositorios git - scryer-prolog.git/commitdiff
fix compare/3 (#1327)
authorMark Thom <[email protected]>
Sun, 6 Mar 2022 22:48:54 +0000 (15:48 -0700)
committerMark Thom <[email protected]>
Sun, 6 Mar 2022 22:49:01 +0000 (15:49 -0700)
src/machine/dispatch.rs

index 830eedb706d1f79d84e522eb9ab07effac021023..f8ee8c6b3ce268bb835eb2cc2b51f4543eaac594 100644 (file)
@@ -58,12 +58,11 @@ impl MachineState {
         let a3 = self.registers[3];
 
         read_heap_cell!(a1,
-            (HeapCellValueTag::Str, s) => {
-                let (name, arity) = cell_as_atom_cell!(self.heap[s])
-                    .get_name_and_arity();
+            (HeapCellValueTag::Atom, (name, arity)) => {
+                debug_assert_eq!(arity, 0);
 
                 match name {
-                    atom!(">") | atom!("<") | atom!("=") if arity == 2 => {
+                    atom!(">") | atom!("<") | atom!("=") => {
                     }
                     _ => {
                         let err = self.domain_error(DomainErrorType::Order, a1);