]> Repositorios git - scryer-prolog.git/commitdiff
Fix the get_code/1-2 predicates to return -1 at the end of stream
authorPaulo Moura <[email protected]>
Sat, 6 Nov 2021 19:41:25 +0000 (19:41 +0000)
committerPaulo Moura <[email protected]>
Sat, 6 Nov 2021 19:41:25 +0000 (19:41 +0000)
src/machine/system_calls.rs

index 8b4d7b27b45769ebaa88d052b8a78b2a9f1c3646..fbc30bced8f21902593bd1f78f3e092df00c35a3 100644 (file)
@@ -2443,10 +2443,10 @@ impl MachineState {
                 }
 
                 if stream.at_end_of_stream() {
-                    let end_of_file = clause_name!("end_of_file");
+                    let end_of_file = Integer::from(-1);
                     let end_of_file = self
                         .heap
-                        .to_unifiable(HeapCellValue::Atom(end_of_file, None));
+                        .to_unifiable(HeapCellValue::Integer(Rc::new(end_of_file)));
 
                     stream.set_past_end_of_stream();