From 658b835a708a413617ad7f279a637984e328f939 Mon Sep 17 00:00:00 2001 From: Paulo Moura Date: Sat, 6 Nov 2021 19:41:25 +0000 Subject: [PATCH] Fix the get_code/1-2 predicates to return -1 at the end of stream --- src/machine/system_calls.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/machine/system_calls.rs b/src/machine/system_calls.rs index 8b4d7b27..fbc30bce 100644 --- a/src/machine/system_calls.rs +++ b/src/machine/system_calls.rs @@ -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(); -- 2.54.0