]> Repositorios git - scryer-prolog.git/commitdiff
put_complete_string should push the empty list to the heap for empty strings (#1209)
authorMark Thom <[email protected]>
Fri, 14 Jan 2022 02:43:54 +0000 (19:43 -0700)
committerMark Thom <[email protected]>
Fri, 14 Jan 2022 23:31:49 +0000 (16:31 -0700)
src/machine/heap.rs

index 6a5e14ef7115d4218176f0e535dc9feda8f25413..a7317cc348e4e09ecc998591704ac9cc4ff7acd1 100644 (file)
@@ -147,7 +147,9 @@ pub(crate) fn put_complete_string(
             }
         }
         None => {
-            empty_list_as_cell!()
+            let h = heap.len();
+            heap.push(empty_list_as_cell!());
+            heap_loc_as_cell!(h)
         }
     }
 }