From: Paulo Moura Date: Sat, 6 Nov 2021 19:41:25 +0000 (+0000) Subject: Fix the get_code/1-2 predicates to return -1 at the end of stream X-Git-Tag: v0.9.0~33^2 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=658b835a708a413617ad7f279a637984e328f939;p=scryer-prolog.git Fix the get_code/1-2 predicates to return -1 at the end of stream --- 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();