]> Repositorios git - scryer-prolog.git/commitdiff
correctly print [] functors (#1189)
authorMark Thom <[email protected]>
Tue, 11 Jan 2022 00:26:57 +0000 (17:26 -0700)
committerMark Thom <[email protected]>
Tue, 11 Jan 2022 00:26:57 +0000 (17:26 -0700)
src/heap_print.rs

index e1c4e214efb151177157e56ac73271d72ba5c72f..f7ba606ca8d7be9fffcbfc880ba20f1f88a8a84d 100644 (file)
@@ -1358,7 +1358,7 @@ impl<'a, Outputter: HCValueOutputter> HCPrinter<'a, Outputter> {
 
         read_heap_cell!(addr,
             (HeapCellValueTag::Atom, (name, arity)) => {
-                if name == atom!("[]") {
+                if name == atom!("[]") && arity == 0 {
                     if !self.at_cdr("") {
                         append_str!(self, "[]");
                     }